Giter VIP home page Giter VIP logo

Comments (3)

fkorotkov avatar fkorotkov commented on June 12, 2024

Getting both the outputs is possible via gotestsum! We should either support their JUnit format or get the raw JSON events and create annotations from them.

from cirrus-ci-annotations.

edigaryev avatar edigaryev commented on June 12, 2024

It seems that neither of these solutions produce file names and line numbers needed to create the GitHub Annotation object.

I've looked into https://github.com/jstemmer/go-junit-report and it also somewhat misses the point of generating machine-readable test results:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
	<testsuite tests="10" failures="1" time="0.061" name="github.com/cirruslabs/cirrus-ci-annotations/parsers">
		<properties>
			<property name="go.version" value="go1.15"></property>
		</properties>
		<testcase classname="parsers" name="Test_AndroidLint_Multiple_Locations" time="0.000"></testcase>
		<testcase classname="parsers" name="Test_AndroidLint_Multiple_Issues" time="0.000"></testcase>
		<testcase classname="parsers" name="Test_AndroidLint_Ignored_Issue" time="0.000"></testcase>
		<testcase classname="parsers" name="TestDummy" time="0.000">
			<failure message="Failed" type="">    dummy_test.go:6: this test&#xA;    dummy_test.go:7: is designed to fail</failure>
		</testcase>
		<testcase classname="parsers" name="Test_GoLangCI" time="0.000"></testcase>
		<testcase classname="parsers" name="Test_JunitJava" time="0.000"></testcase>
		<testcase classname="parsers" name="Test_JunitKotlin" time="0.000"></testcase>
		<testcase classname="parsers" name="Test_PythonXMLRunner" time="0.000"></testcase>
		<testcase classname="parsers" name="Test_RSpec_MultipleStates" time="0.000"></testcase>
		<testcase classname="parsers" name="Test_RuboCop_DocsExample" time="0.000"></testcase>
	</testsuite>
</testsuites>

Perhaps my assumption is wrong and you can still generate annotations with this? Or we need to dig deeper and parse the actual test output (perhaps as a part of gotestsum's codebase)?

from cirrus-ci-annotations.

fkorotkov avatar fkorotkov commented on June 12, 2024

Doesn't seem it's there 😪 https://golang.org/cmd/test2json/#hdr-Output_Format

Quite ridiculous 😲

from cirrus-ci-annotations.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.