Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v1.7.0 to v1 branche #298

Merged
merged 53 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
d553414
Update README.md
IanMoroney Feb 14, 2022
c3f44ea
fix: action fields with default values should not be required
TomerFi May 7, 2022
6bd7855
Update jest-Junit part of Readme
ryancasburn-KAI Jun 5, 2022
375f855
Add dependabot configuration
yeikel Feb 7, 2023
279d40a
Add github-actions
yeikel Mar 6, 2023
2868c9a
Add new outputs for url and url_html for future references
luisito666 Mar 27, 2023
2f00523
Update readme and add information about url and url_html
luisito666 Mar 27, 2023
9e78da5
add feature fail-on-empty
gdams Apr 3, 2023
2cc6a8c
"Coma separated" -> "Comma-separated"
tangowithfoxtrot Jul 18, 2023
d51dd9a
"Coma separated" -> "Comma-separated"
tangowithfoxtrot Jul 18, 2023
daece30
Avoid split on undefined
cazou Aug 9, 2023
ea0fb91
Add permissions to example yml files
TurnrDev Sep 21, 2023
f4404ee
Merge pull request #254 from tangowithfoxtrot/main
j-catania Sep 21, 2023
9485262
update workflows
j-catania Sep 21, 2023
0ada353
fix readme version of actions/*
j-catania Sep 21, 2023
476b57a
update dep
j-catania Sep 21, 2023
28dac3b
Bump ws from 7.3.1 to 7.5.9 in /reports/jest
dependabot[bot] Sep 21, 2023
76a051e
fixing lint
j-catania Sep 22, 2023
ac305c1
fixing format
j-catania Sep 22, 2023
5895924
fix npm package
j-catania Sep 22, 2023
a02f895
fixing format
j-catania Sep 22, 2023
bc48d4d
fixing package script
j-catania Sep 22, 2023
ef9ec10
Merge pull request #269 from dorny/feature/dep
j-catania Sep 22, 2023
76dd0e0
Bump ansi-regex from 3.0.0 to 3.0.1 in /reports/mocha
dependabot[bot] Sep 22, 2023
f120b1e
Bump json5 from 2.1.3 to 2.2.3 in /reports/jest
dependabot[bot] Sep 22, 2023
54a8c3c
Bump qs from 6.5.2 to 6.5.3 in /reports/jest
dependabot[bot] Sep 22, 2023
eb71782
Bump minimist from 1.2.5 to 1.2.8 in /reports/jest
dependabot[bot] Sep 22, 2023
3fcc30f
Bump decode-uri-component from 0.2.0 to 0.2.2 in /reports/jest
dependabot[bot] Sep 22, 2023
b5ef0e7
Bump ansi-regex from 4.1.0 to 4.1.1 in /reports/jest
dependabot[bot] Sep 22, 2023
62386e9
Merge pull request #263 from TurnrDev/patch-1
j-catania Sep 22, 2023
61135b8
Merge pull request #243 from gdams/fail_on_empty
j-catania Sep 22, 2023
dcaa140
Merge pull request #228 from yeikel/patch-1
j-catania Sep 22, 2023
148c3e5
Bump actions/checkout from 2 to 4
dependabot[bot] Sep 22, 2023
92138a6
Merge pull request #265 from dorny/dependabot/npm_and_yarn/reports/je…
j-catania Sep 22, 2023
b09b166
Merge pull request #279 from dorny/dependabot/github_actions/actions/…
j-catania Sep 22, 2023
19f5a0d
Merge pull request #242 from luisito666/feature/add-new-output-for-ur…
j-catania Sep 22, 2023
06d7fcc
Merge pull request #158 from IanMoroney/patch-1
j-catania Sep 22, 2023
efc4fb3
Merge pull request #176 from ryancasburn-KAI/patch-1
j-catania Sep 22, 2023
dd9d115
Merge pull request #172 from TomerFi/def-vals-not-required
j-catania Sep 22, 2023
36f318e
Merge pull request #278 from dorny/dependabot/npm_and_yarn/reports/je…
j-catania Sep 25, 2023
8b17ce4
Merge pull request #276 from dorny/dependabot/npm_and_yarn/reports/je…
j-catania Sep 25, 2023
a677dec
Merge pull request #275 from dorny/dependabot/npm_and_yarn/reports/je…
j-catania Sep 25, 2023
d132e07
Merge pull request #272 from dorny/dependabot/npm_and_yarn/reports/je…
j-catania Sep 25, 2023
bd1b0de
Merge pull request #271 from dorny/dependabot/npm_and_yarn/reports/je…
j-catania Sep 25, 2023
9301b44
Merge pull request #270 from dorny/dependabot/npm_and_yarn/reports/mo…
j-catania Sep 25, 2023
91ccfa2
declare 'url' and 'url_html' as action outputs
micha-one Sep 25, 2023
4eb4bc2
Merge pull request #287 from micha-one/main
j-catania Oct 9, 2023
f3a6ff2
Merge pull request #258 from cazou/fix-split-on-undefined
j-catania Oct 9, 2023
4b7b789
add version npm script
j-catania Oct 9, 2023
9b29e41
1.7.0
j-catania Oct 9, 2023
ededcdb
Merge pull request #296 from dorny/release/v1.7.0
j-catania Oct 9, 2023
62af365
CHANGELOG.md
j-catania Oct 9, 2023
214173a
Merge pull request #297 from dorny/release/v1.7.0
j-catania Oct 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 2 additions & 23 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"i18n-text/no-en": "off",
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"import/no-named-as-default": "off",
"no-shadow": "off",
"no-unused-vars": "off",
"prefer-template": "off",
Expand Down Expand Up @@ -60,29 +61,7 @@
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`

// Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default

// use <root>/path/to/folder/tsconfig.json
"project": "path/to/folder",

// Multiple tsconfigs (Useful for monorepos)

// use a glob pattern
"project": "packages/*/tsconfig.json",

// use an array
"project": [
"packages/module-a/tsconfig.json",
"packages/module-b/tsconfig.json"
],

// use an array of glob patterns
"project": [
"packages/*/tsconfig.json",
"other-packages/*/tsconfig.json"
]
"alwaysTryTypes": true // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
6 changes: 3 additions & 3 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set Node.js 16.x
uses: actions/setup-node@v3.5.1
uses: actions/setup-node@v3
with:
node-version: 16.x

Expand All @@ -46,7 +46,7 @@ jobs:
id: diff

# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: node --version
- run: npm ci
- run: npm run build
Expand All @@ -23,7 +23,7 @@ jobs:

- name: Upload test results
if: success() || failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: test-results
path: __tests__/__results__/*.xml
2 changes: 1 addition & 1 deletion .github/workflows/manual-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: npm ci
- run: npm run build
- run: npm test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Workflow test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ./
with:
artifact: test-results
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Changelog

## 1.7.0
* Fix #199: Use ✅ instead of ✔️ for better cross platform look by @petrdvorak in https://github.com/dorny/test-reporter/pull/200
* Verify content of dist/ folder matches build output by @dorny in https://github.com/dorny/test-reporter/pull/207
* Gracefully handle empty nested testsuite elements for JUnit. by @rvdlaarschot in https://github.com/dorny/test-reporter/pull/193
* Gracefully handle empty failure tags by @haudren-woven in https://github.com/dorny/test-reporter/pull/213
* Fix #208 - java-junit: show annotations on PR changed files by @atsu85 in https://github.com/dorny/test-reporter/pull/209
* Only report failure if fail-on-error is set by @trond-snekvik in https://github.com/dorny/test-reporter/pull/214
* Improve clarity on configuring for forkable repos by @abelbraaksma in https://github.com/dorny/test-reporter/pull/211
* Suppress "Processing test results from" log by @vasanthdharmaraj in https://github.com/dorny/test-reporter/pull/179
* Skip listing of files if error parsing is disabled by @dorny in https://github.com/dorny/test-reporter/pull/216
* Correct typo in docs by @tangowithfoxtrot in https://github.com/dorny/test-reporter/pull/254
* update dependencies by @j-catania in https://github.com/dorny/test-reporter/pull/269
* Add permissions to example yml files by @TurnrDev in https://github.com/dorny/test-reporter/pull/263
* add feature fail-on-empty by @gdams in https://github.com/dorny/test-reporter/pull/243
* Add dependabot configuration by @yeikel in https://github.com/dorny/test-reporter/pull/228
* Bump ws from 7.3.1 to 7.5.9 in /reports/jest by @dependabot in https://github.com/dorny/test-reporter/pull/265
* Bump actions/checkout from 2 to 4 by @dependabot in https://github.com/dorny/test-reporter/pull/279
* Add new output for url url html by @luisito666 in https://github.com/dorny/test-reporter/pull/242
* Update README.md by @IanMoroney in https://github.com/dorny/test-reporter/pull/158
* Update jest-Junit part of Readme by @ryancasburn-KAI in https://github.com/dorny/test-reporter/pull/176
* fix: default-valued fields are not mandatory by @TomerFi in https://github.com/dorny/test-reporter/pull/172
* Bump ansi-regex from 4.1.0 to 4.1.1 in /reports/jest by @dependabot in https://github.com/dorny/test-reporter/pull/278
* Bump decode-uri-component from 0.2.0 to 0.2.2 in /reports/jest by @dependabot in https://github.com/dorny/test-reporter/pull/276
* Bump minimist from 1.2.5 to 1.2.8 in /reports/jest by @dependabot in https://github.com/dorny/test-reporter/pull/275
* Bump qs from 6.5.2 to 6.5.3 in /reports/jest by @dependabot in https://github.com/dorny/test-reporter/pull/272
* Bump json5 from 2.1.3 to 2.2.3 in /reports/jest by @dependabot in https://github.com/dorny/test-reporter/pull/271
* Bump ansi-regex from 3.0.0 to 3.0.1 in /reports/mocha by @dependabot in https://github.com/dorny/test-reporter/pull/270
* declare 'url' and 'url_html' as action outputs by @micha-one in https://github.com/dorny/test-reporter/pull/287
* Avoid split on undefined by @cazou in https://github.com/dorny/test-reporter/pull/258

## v1.6.0
- [Update to node16 + recent versions of core and exec packages](https://github.com/dorny/test-reporter/pull/203)
- [Update all dependencies to latest versions](https://github.com/dorny/test-reporter/pull/186)
Expand Down
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ If that's fine for you, using this action is as simple as:
on:
pull_request:
push:
permissions:
contents: read
actions: read
checks: write
jobs:
build-test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # checkout the repo
- uses: actions/checkout@v3 # checkout the repo
- run: npm ci # install packages
- run: npm test # run tests (configured to use jest-junit reporter)

Expand Down Expand Up @@ -69,10 +73,10 @@ jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # checkout the repo
- uses: actions/checkout@v3 # checkout the repo
- run: npm ci # install packages
- run: npm test # run tests (configured to use jest-junit reporter)
- uses: actions/upload-artifact@v2 # upload test results
- uses: actions/upload-artifact@v3 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
Expand All @@ -86,6 +90,10 @@ on:
workflows: ['CI'] # runs after CI workflow
types:
- completed
permissions:
contents: read
actions: read
checks: write
jobs:
report:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -116,7 +124,7 @@ jobs:
# Name of the Check Run which will be created
name: ''
# Coma separated list of paths to test results
# Comma-separated list of paths to test results
# Supports wildcards via [fast-glob](https://github.com/mrmlnc/fast-glob)
# All matched result files must be of the same format
path: ''
Expand Down Expand Up @@ -158,6 +166,9 @@ jobs:
# Set action as failed if test report contains any failed test
fail-on-error: 'true'
# Set this action as failed if no test results were found
fail-on-empty: 'true'
# Relative path under $GITHUB_WORKSPACE where the repository was checked out.
working-directory: ''
Expand All @@ -174,6 +185,8 @@ jobs:
| failed | Count of failed tests |
| skipped | Count of skipped tests |
| time | Test execution time [ms] |
| url | Check run URL |
| url_html | Check run URL HTML |

## Supported formats

Expand Down Expand Up @@ -258,14 +271,14 @@ Some heuristic was necessary to figure out the mapping between the line in the s
</details>

<details>
<summary>jest-Junit</summary>
<summary>jest-junit</summary>

[JEST](https://jestjs.io/) testing framework support requires the usage of [jest-Junit](https://github.com/jest-community/jest-Junit) reporter.
[JEST](https://jestjs.io/) testing framework support requires the usage of [jest-junit](https://github.com/jest-community/jest-junit) reporter.
It will create test results in Junit XML format which can be then processed by this action.
You can use the following example configuration in `package.json`:
```json
"scripts": {
"test": "jest --ci --reporters=default --reporters=jest-Junit"
"test": "jest --ci --reporters=default --reporters=jest-junit"
},
"devDependencies": {
"jest": "^26.5.3",
Expand Down Expand Up @@ -310,7 +323,7 @@ Unfortunately, there are some known issues and limitations caused by GitHub API:

- Test report (i.e. Check Run summary) is markdown text. No custom styling or HTML is possible.
- Maximum report size is 65535 bytes. Input parameters `list-suites` and `list-tests` will be automatically adjusted if max size is exceeded.
- Test report can't reference any additional files (e.g. screenshots). You can use `actions/upload-artifact@v2` to upload them and inspect them manually.
- Test report can't reference any additional files (e.g. screenshots). You can use `actions/upload-artifact@v3` to upload them and inspect them manually.
- Check Runs are created for specific commit SHA. It's not possible to specify under which workflow test report should belong if more
workflows are running for the same SHA. Thanks to this GitHub "feature" it's possible your test report will appear in an unexpected place in GitHub UI.
For more information, see [#67](https://github.com/dorny/test-reporter/issues/67).
Expand Down
16 changes: 12 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
required: true
path:
description: |
Coma separated list of paths to test results
Comma-separated list of paths to test results
Supports wildcards via [fast-glob](https://github.com/mrmlnc/fast-glob)
All matched result files must be of same format
required: true
Expand All @@ -37,24 +37,28 @@ inputs:
Limits which test suites are listed. Supported options:
- all
- only-failed
required: true
required: false
default: 'all'
list-tests:
description: |
Limits which test cases are listed. Supported options:
- all
- only-failed
- none
required: true
required: false
default: 'all'
max-annotations:
description: |
Limits number of created annotations with error message and stack trace captured during test execution.
Must be less or equal to 50.
required: true
required: false
default: '10'
fail-on-error:
description: Set this action as failed if test report contain any failed test
required: false
default: 'true'
fail-on-empty:
description: Set this action as failed if no test results were found
required: true
default: 'true'
working-directory:
Expand Down Expand Up @@ -85,6 +89,10 @@ outputs:
description: Count of skipped tests
time:
description: Test execution time [ms]
url:
description: Check run URL
url_html:
description: Check run URL HTML
runs:
using: 'node16'
main: 'dist/index.js'
Expand Down
Loading