Commit Graph

103 Commits

Author SHA1 Message Date
Michal Dorner
e54753f811 Update to node16 + recent versions of core and exec packages 2022-10-13 22:05:31 +02:00
Michal Dorner
aba461c3a7 Downgrade got package to v11.x
got@v12.x has a dependency on @sindresorhus/is@v5.x and it uses optional chaining operator "?.".  
Probably due to issue https://github.com/vercel/ncc/issues/873 this syntax got into our dist/index.js. For some unknown reason it results in error when action is executed in GitHub runner despite the node version is 16.17.
2022-08-23 23:10:34 +02:00
Michal Dorner
b595428c55 Update multiple packages + fix eslint resolver issue 2022-08-20 00:06:56 +02:00
Michal Dorner
57e5862411 Update multiple packages and configs 2022-08-19 23:37:14 +02:00
Michal Dorner
4c7348c4be Update TypeScript 2022-08-19 22:19:29 +02:00
Michal Dorner
8848447e3f Fix tests on non us-EN local env (#185)
* Fix tests on non us-EN local env

Different locale might result in different alphabetical order of tests in report. Tests using snapshot comparison then fails

* Fix code style
2022-08-19 21:53:20 +02:00
Michal Dorner
de0b4b9ece Add option to convert backslashes in path pattern to forward slashes
The fast-glob library that is internally used interprets backslashes as escape characters. If enabled, all backslashes in provided path will be replaced by forward slashes and act as directory separators. It might be useful when path input variable is composed dynamically from existing directory paths on Windows.

Closes #127
2021-06-22 22:33:11 +02:00
Michal Dorner
2ac8b4498f Force generating summary if there is single results file and onlySummary is enabled 2021-06-22 21:28:22 +02:00
Giuseppe Lippolis
17e793242c feat: allows to generate the summary only. 2021-06-03 10:57:57 +02:00
Michal Dorner
d01ef000ba Fix JUnit test-cases with error misclassified as passed test
Previous implementation considered only test-cases with <failure> as failed. This fix makes processing of <error> and <failure> the same. It also handles situation when error or failure elements contains only text and no attributes.
2021-05-24 15:03:34 +02:00
Michal Dorner
72c193c336 Patch java-junit to handle missing time field
Normally a <testsuites> element has a time field. In some JUnit implementations this field is missing. This issue was found in junit XML created in matlab.

At the moment I don't plan to explicitly support matlab - that would require to add more tests and documentation. However this patch should make it work with the existing java-junit parser.
2021-05-13 22:39:52 +02:00
Michal Dorner
dcaab46b46 Fix dart-json parsing broken by print message
Print message related to suite, instead of a specific test, would break parsing - it would expect test object to be present in dictionary but there would be none.
This fix adds necessary check and messages not related to tracked tests will be ignored.
2021-05-13 21:48:55 +02:00
Michal Dorner
43d89d5ee5 Fix dotnet-trx parser failing on passed tests with non-empty error info 2021-04-20 21:38:55 +02:00
Michal Dorner
6662b9362e Fix dotnet-trx parsing of tests with custom display names 2021-04-20 08:40:05 +02:00
Michal Dorner
ee126813a2 Merge branch 'dev' into mocha-json 2021-04-01 00:05:41 +02:00
Michal Dorner
4c2f9f34f7 Use full URL in suites table
Adds full URL in place previous commit missed
2021-03-31 23:30:19 +02:00
Michal Dorner
fab342311c Use full URL to link test suites
GitHub UI for some unknown reason navigates user to check run with `check_suite_focus=true` query argument. With this argument unfortunately navigation to document ID with `#something` doesn't work
2021-03-31 23:22:02 +02:00
Michal Dorner
cfaaaf1a47 Use non-breaking space between icon and suite name 2021-03-31 22:34:58 +02:00
Michal Dorner
690ec77880 New report rendering with code blocks instead of tables
Previously we listed tests using markdown tables. Each test group had it's own table and textual preface saying how many tests were executed in what time.
This was completely reworked - now tests are listed inside code block. Grouping is achieved using simple indentation. Duration of individual tests is no longer shown - it produced too much "noise" in the report. Pass/Fail check-mark was also moved before name of test suite.
Behavior of "listTests" option was also changed - now if set to failed, it will list all tests, but only if suite is failed. Otherwise test listing is completely omitted.
Last change affects report trimming - if report is still too big after "listTests" is set to "failed" - it will trim report to fit max size and add informational message at the end.
2021-03-31 21:49:53 +02:00
Michal Dorner
96df6db61e Round test duration to whole seconds if it's more then 1s
Report will contain less accurate information but it will be easier to read.
2021-03-31 21:33:21 +02:00
Michal Dorner
ea36be4653 Improve test error messages from flutter
For some reason the error message from flutter SDK might contain no useful information. Basically it just says that test failed and you should see the logs. Logs itself are provided as content of `print` event. This commit adds special processing for this behavior - it parses actual error message out of print event.
2021-03-31 21:25:54 +02:00
Michal Dorner
d29a37e78a Fixes #82 - net-trx parser handles missing duration attribute 2021-03-24 18:02:31 +01:00
Michal Dorner
d5e42b8d57 dart-json: remove group name from test case names 2021-03-23 21:58:20 +01:00
Michal Dorner
3a0bb833dc #83 - Use non-capturing optional group, add tests and update dist 2021-03-23 21:39:47 +01:00
Shannon Deminick
c0e7f7f7dc Fixes #83
This regex change should match the dotnet format with or without milliseconds
2021-03-23 11:09:02 +11:00
Michal Dorner
3768e4e756 Merge branch 'main' into mocha-json 2021-03-08 21:00:14 +01:00
Michal Dorner
16adfe9b7e Add support for java-junit 2021-03-07 22:06:12 +01:00
Michal Dorner
a9749e3840 Handle test reports with no test cases 2021-03-07 12:22:00 +01:00
Michal Dorner
cf4814e8de Do not throw error when workflow_run has been cancelled
It's common to cancel all jobs/workflows after first error. There could still be test results user wants to see in a report
2021-03-07 11:25:42 +01:00
Michal Dorner
073a4b9a03 Add info log when fetching git tree 2021-03-07 09:52:57 +01:00
Michal Dorner
953bdcc20a Reduce number of API calls to get list of files tracked by GitHub 2021-03-07 09:33:58 +01:00
Michal Dorner
fbb83bff74 Include group name in error annotations 2021-02-24 21:33:29 +01:00
Michal Dorner
8dba8714d0 Fix mocha report fixture + test duration handling 2021-02-24 21:32:51 +01:00
Michal Dorner
9b675bd55f Add support for mocha-json 2021-02-23 22:39:35 +01:00
Michal Dorner
32f5b23752 Set listTests and listSuites to lower detail if report is too big 2021-02-20 22:32:30 +01:00
Michal Dorner
4e1eb73eb5 Fail the action if triggering workflow run has been cancelled 2021-02-20 14:43:46 +01:00
Michal Dorner
3340176ee8 Remove artifact-test from CI
Artifacts via public API are not available before whole workflow is finished. Therefore it's not possible to execute test this way
2021-02-18 22:23:20 +01:00
Michal Dorner
8efb156d28 Fail the action if no test results are processed 2021-02-18 21:18:04 +01:00
Michal Dorner
93c3964547 Misc fixes + test sleep before artifact-test 2021-02-17 21:20:40 +01:00
Michal Dorner
96237b3119 Improve logging & fix wrong SHA used 2021-02-17 08:28:52 +01:00
Michal Dorner
c5671cf48a Improve logging 2021-02-17 08:12:45 +01:00
Michal Dorner
09d1ac9fc3 Improve logging 2021-02-16 22:02:56 +01:00
Michal Dorner
89f214d9f3 Fix artifact-provider zip processing and report name generation 2021-02-15 21:07:14 +01:00
Michal Dorner
e356ffe9d0 Removed progress percentage as there is no way to deduce content length 2021-02-15 21:06:38 +01:00
Michal Dorner
1ae86a176d artifact-provider: improve logging 2021-02-15 20:46:28 +01:00
Michal Dorner
da9cc2c0d9 Show artifact download progress 2021-02-15 20:29:51 +01:00
Michal Dorner
8819b4b3d4 Pass auth token to got request 2021-02-15 17:00:25 +01:00
Michal Dorner
52024f70c3 Use got to fetch artifact URL
See issue: https://github.com/octokit/request.js/issues/240
2021-02-15 16:49:52 +01:00
Michal Dorner
1f5bb98685 Fix artifact download 2021-02-15 16:28:28 +01:00
Michal Dorner
064a15c405 Fix regex parsing in artifact-provider 2021-02-15 16:15:21 +01:00