ashley-taylor / junit-report-annotations-action

Create an annotation of the build information and also list first n failed tests as seporate annotations
12 stars 29 forks source link

Support groovy and other file extensions #6

Open flicken opened 4 years ago

flicken commented 4 years ago

This line fails when running on a Groovy codebase: https://github.com/ashley-taylor/junit-report-annotations-action/blob/69564f631cc09c038f02699c0879499ac6e30e7e/index.js#L44

Should be able to handle any file extension, including Groovy, Scala, Kotlin.

ashley-taylor commented 4 years ago

can you try the new version 1.2 and let me know if this now works

flicken commented 4 years ago

It now doesn't throw an exception, but doesn't add any annotations either. Just prints the following onto the console for the step:

Run ashley-taylor/junit-report-annotations-action@1.2
  with:
    path: build/**/TEST-*.xml
    testSrcPath: src/test/groovy/
    access-token: ***
    includeSummary: true
    numFailures: 10
  env:
    JAVA_HOME: /opt/hostedtoolcache/jdk/11.0.7/x64
    JAVA_HOME_11.0.7_x64: /opt/hostedtoolcache/jdk/11.0.7/x64
##[warning]Junit Results ran 38 in 5.494000000000001 seconds 0 Errored, 1 Failed, 0 Skipped
##[warning]Junit test fail a test failed Condition not satisfied:

1 + 1 == 3
  |   |
  2   false

I believe this is because this conditional is true: https://github.com/ashley-taylor/junit-report-annotations-action/blob/0d4b269e4d13ab6af5851bd5f794b5c903954a06/index.js#L107

ashley-taylor commented 4 years ago

have changed how these report back to github. Could you try switch the version of this plugin to @master and run it and tell me if it fixes your issue. Please don't leave it on the @master version If so will build a release with the change.