Compare commits

...

14 Commits

Author SHA1 Message Date
Michal Dorner
c9b3d0e2bd Update CHANGELOG for v1.6.0 2022-10-13 22:14:03 +02:00
Michal Dorner
d93282af1c Merge pull request #203 from dorny/update-node-and-dependencies
Update to node16 + recent versions of core and exec packages
2022-10-13 22:09:41 +02:00
Michal Dorner
e54753f811 Update to node16 + recent versions of core and exec packages 2022-10-13 22:05:31 +02:00
Michal Dorner
0d9714ddc7 Merge pull request #186 from dorny/update-dependencies
Update all dependencies to latest versions
2022-08-23 23:13:53 +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
a95a149c9a Print used node version in CI job 2022-08-23 22:46:11 +02:00
Michal Dorner
0b7f7244db Update dist 2022-08-20 00:10:53 +02:00
Michal Dorner
b595428c55 Update multiple packages + fix eslint resolver issue 2022-08-20 00:06:56 +02:00
Michal Dorner
5558abf4ac Update prettier 2022-08-19 23:40:20 +02:00
Michal Dorner
bbf369dfb0 Update got 2022-08-19 23:39:23 +02:00
Michal Dorner
57e5862411 Update multiple packages and configs 2022-08-19 23:37:14 +02:00
Michal Dorner
81fcbf17a9 Update js-yaml 2022-08-19 22:21:54 +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
21 changed files with 20953 additions and 15177 deletions

View File

@@ -1,3 +1,4 @@
dist/ dist/
lib/ lib/
node_modules/ node_modules/
jest.config.js

View File

@@ -1,57 +1,89 @@
{ {
"plugins": ["jest", "@typescript-eslint"], "plugins": ["import", "jest", "@typescript-eslint"],
"extends": ["plugin:github/recommended"], "extends": ["plugin:github/recommended"],
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"parserOptions": { "parserOptions": {
"ecmaVersion": 9, "ecmaVersion": 9,
"sourceType": "module", "sourceType": "module",
"project": "./tsconfig.json" "project": "./tsconfig.json"
},
"rules": {
"i18n-text/no-en": "off",
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-shadow": "off",
"no-unused-vars": "off",
"prefer-template": "off",
"@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_"}],
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"semi": "off",
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
}, },
"rules": { "import/resolver": {
"camelcase": "off", "typescript": {
"eslint-comments/no-use": "off", "alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
"import/no-namespace": "off",
"no-shadow": "off", // Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
"no-unused-vars": "off",
"prefer-template": "off", // use <root>/path/to/folder/tsconfig.json
"semi": [ "error", "never"], "project": "path/to/folder",
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
"@typescript-eslint/array-type": "error", // Multiple tsconfigs (Useful for monorepos)
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error", // use a glob pattern
"@typescript-eslint/consistent-type-assertions": "error", "project": "packages/*/tsconfig.json",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"], // use an array
"@typescript-eslint/no-array-constructor": "error", "project": [
"@typescript-eslint/no-empty-interface": "error", "packages/module-a/tsconfig.json",
"@typescript-eslint/no-explicit-any": "error", "packages/module-b/tsconfig.json"
"@typescript-eslint/no-extraneous-class": "error", ],
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error", // use an array of glob patterns
"@typescript-eslint/no-misused-new": "error", "project": [
"@typescript-eslint/no-namespace": "error", "packages/*/tsconfig.json",
"@typescript-eslint/no-require-imports": "error", "other-packages/*/tsconfig.json"
"@typescript-eslint/no-shadow": "error", ]
"@typescript-eslint/no-non-null-assertion": "warn", }
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_"}],
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
} }
} }
}

View File

@@ -14,6 +14,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: node --version
- run: npm ci - run: npm ci
- run: npm run build - run: npm run build
- run: npm run format-check - run: npm run format-check

View File

@@ -1,5 +1,10 @@
# Changelog # Changelog
## 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)
- [Fix tests on non us-EN local env](https://github.com/dorny/test-reporter/pull/185)
## v1.5.0 ## v1.5.0
- [Add option to convert backslashes in path pattern to forward slashes](https://github.com/dorny/test-reporter/pull/128) - [Add option to convert backslashes in path pattern to forward slashes](https://github.com/dorny/test-reporter/pull/128)
- [Add option to generate only the summary from processed test results files](https://github.com/dorny/test-reporter/pull/123) - [Add option to generate only the summary from processed test results files](https://github.com/dorny/test-reporter/pull/123)

View File

@@ -86,7 +86,7 @@ outputs:
time: time:
description: Test execution time [ms] description: Test execution time [ms]
runs: runs:
using: 'node12' using: 'node16'
main: 'dist/index.js' main: 'dist/index.js'
branding: branding:
color: blue color: blue

18036
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

157
dist/licenses.txt generated vendored
View File

@@ -12,9 +12,27 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
@actions/exec @actions/exec
MIT MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/github @actions/github
MIT MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/http-client @actions/http-client
MIT MIT
@@ -43,6 +61,15 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/io @actions/io
MIT MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@nodelib/fs.scandir @nodelib/fs.scandir
MIT MIT
@@ -669,6 +696,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
compress-brotli
MIT
The MIT License (MIT)
Copyright © 2019 Kiko Beats <josefrancisco.verdu@gmail.com> (kikobeats.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
decompress-response decompress-response
MIT MIT
MIT License MIT License
@@ -1028,28 +1080,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keyv keyv
MIT MIT
MIT License
Copyright (c) 2017 Luke Childs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
lowercase-keys lowercase-keys
MIT MIT
@@ -1118,7 +1148,7 @@ mimic-response
MIT MIT
MIT License MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com) Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@@ -1247,6 +1277,30 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
queue-microtask
MIT
The MIT License (MIT)
Copyright (c) Feross Aboukhadijeh
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
quick-lru quick-lru
MIT MIT
MIT License MIT License
@@ -1429,6 +1483,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
tr46
MIT
tunnel tunnel
MIT MIT
The MIT License (MIT) The MIT License (MIT)
@@ -1465,6 +1522,60 @@ Permission to use, copy, modify, and/or distribute this software for any purpose
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
uuid
MIT
The MIT License (MIT)
Copyright (c) 2010-2020 Robert Kieffer and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
webidl-conversions
BSD-2-Clause
# The BSD 2-Clause License
Copyright (c) 2014, Domenic Denicola
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
whatwg-url
MIT
The MIT License (MIT)
Copyright (c) 20152016 Sebastian Mayr
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
wrappy wrappy
ISC ISC
The ISC License The ISC License

2
dist/sourcemap-register.js generated vendored

File diff suppressed because one or more lines are too long

17665
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -30,9 +30,9 @@
"author": "Michal Dorner <dorner.michal@gmail.com>", "author": "Michal Dorner <dorner.michal@gmail.com>",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.2.6", "@actions/core": "^1.10.0",
"@actions/exec": "^1.0.4", "@actions/exec": "^1.1.1",
"@actions/github": "^4.0.0", "@actions/github": "^5.0.3",
"adm-zip": "^0.5.3", "adm-zip": "^0.5.3",
"fast-glob": "^3.2.5", "fast-glob": "^3.2.5",
"got": "^11.8.2", "got": "^11.8.2",
@@ -40,27 +40,30 @@
"xml2js": "^0.4.23" "xml2js": "^0.4.23"
}, },
"devDependencies": { "devDependencies": {
"@octokit/types": "^6.12.0", "@octokit/types": "^7.1.0",
"@octokit/webhooks": "^7.21.0", "@octokit/webhooks": "^10.1.5",
"@types/adm-zip": "^0.4.33", "@octokit/webhooks-types": "^6.3.6",
"@types/adm-zip": "^0.5.0",
"@types/github-slugger": "^1.3.0", "@types/github-slugger": "^1.3.0",
"@types/jest": "^26.0.20", "@types/jest": "^28.1.7",
"@types/node": "^14.14.20", "@types/node": "^18.7.7",
"@types/picomatch": "^2.2.1", "@types/picomatch": "^2.2.1",
"@types/xml2js": "^0.4.8", "@types/xml2js": "^0.4.8",
"@typescript-eslint/eslint-plugin": "^4.16.1", "@typescript-eslint/eslint-plugin": "^5.33.1",
"@typescript-eslint/parser": "^4.16.1", "@typescript-eslint/parser": "^5.33.1",
"@vercel/ncc": "^0.27.0", "@vercel/ncc": "^0.34.0",
"eslint": "^7.21.0", "eslint": "^8.22.0",
"eslint-import-resolver-typescript": "^3.4.2",
"eslint-plugin-github": "^4.1.2", "eslint-plugin-github": "^4.1.2",
"eslint-plugin-jest": "^24.1.7", "eslint-plugin-import": "^2.26.0",
"jest": "^26.6.3", "eslint-plugin-jest": "^26.8.3",
"jest-circus": "^26.6.3", "jest": "^28.1.3",
"jest-junit": "^12.0.0", "jest-circus": "^28.1.3",
"js-yaml": "^4.0.0", "jest-junit": "^14.0.0",
"prettier": "2.2.1", "js-yaml": "^4.1.0",
"ts-jest": "^26.5.3", "prettier": "^2.7.1",
"typescript": "^4.2.3" "ts-jest": "^28.0.8",
"typescript": "^4.7.4"
}, },
"jest-junit": { "jest-junit": {
"suiteName": "jest tests", "suiteName": "jest tests",

View File

@@ -50,7 +50,7 @@ export class ArtifactProvider implements InputProvider {
async load(): Promise<ReportInput> { async load(): Promise<ReportInput> {
const result: ReportInput = {} const result: ReportInput = {}
const resp = await this.octokit.actions.listWorkflowRunArtifacts({ const resp = await this.octokit.rest.actions.listWorkflowRunArtifacts({
...github.context.repo, ...github.context.repo,
run_id: this.runId run_id: this.runId
}) })

View File

@@ -25,7 +25,8 @@ async function main(): Promise<void> {
const testReporter = new TestReporter() const testReporter = new TestReporter()
await testReporter.run() await testReporter.run()
} catch (error) { } catch (error) {
core.setFailed(error.message) if (error instanceof Error) core.setFailed(error)
else core.setFailed(JSON.stringify(error))
} }
} }
@@ -154,7 +155,7 @@ class TestReporter {
} }
core.info(`Creating check run ${name}`) core.info(`Creating check run ${name}`)
const createResp = await this.octokit.checks.create({ const createResp = await this.octokit.rest.checks.create({
head_sha: this.context.sha, head_sha: this.context.sha,
name, name,
status: 'in_progress', status: 'in_progress',
@@ -167,7 +168,7 @@ class TestReporter {
core.info('Creating report summary') core.info('Creating report summary')
const {listSuites, listTests, onlySummary} = this const {listSuites, listTests, onlySummary} = this
const baseUrl = createResp.data.html_url const baseUrl = createResp.data.html_url as string
const summary = getReport(results, {listSuites, listTests, baseUrl, onlySummary}) const summary = getReport(results, {listSuites, listTests, baseUrl, onlySummary})
core.info('Creating annotations') core.info('Creating annotations')
@@ -178,7 +179,7 @@ class TestReporter {
const icon = isFailed ? Icon.fail : Icon.success const icon = isFailed ? Icon.fail : Icon.success
core.info(`Updating check run conclusion (${conclusion}) and output`) core.info(`Updating check run conclusion (${conclusion}) and output`)
const resp = await this.octokit.checks.update({ const resp = await this.octokit.rest.checks.update({
check_run_id: createResp.data.id, check_run_id: createResp.data.id,
conclusion, conclusion,
status: 'completed', status: 'completed',

View File

@@ -92,7 +92,8 @@ export class DartJsonParser implements TestParser {
try { try {
return JSON.parse(str) return JSON.parse(str)
} catch (e) { } catch (e) {
const col = e.columnNumber !== undefined ? `:${e.columnNumber}` : '' const errWithCol = e as {columnNumber?: number}
const col = errWithCol.columnNumber !== undefined ? `:${errWithCol.columnNumber}` : ''
throw new Error(`Invalid JSON at ${path}:${i + 1}${col}\n\n${e}`) throw new Error(`Invalid JSON at ${path}:${i + 1}${col}\n\n${e}`)
} }
}) })
@@ -194,7 +195,8 @@ export class DartJsonParser implements TestParser {
private getErrorMessage(message: string, print: string): string { private getErrorMessage(message: string, print: string): string {
if (this.sdk === 'flutter') { if (this.sdk === 'flutter') {
const uselessMessageRe = /^Test failed\. See exception logs above\.\nThe test description was:/m const uselessMessageRe = /^Test failed\. See exception logs above\.\nThe test description was:/m
const flutterPrintRe = /^ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK +\s+(.*)\s+When the exception was thrown, this was the stack:/ms const flutterPrintRe =
/^ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK +\s+(.*)\s+When the exception was thrown, this was the stack:/ms
if (uselessMessageRe.test(message)) { if (uselessMessageRe.test(message)) {
const match = print.match(flutterPrintRe) const match = print.match(flutterPrintRe)
if (match !== null) { if (match !== null) {

View File

@@ -1,6 +1,7 @@
import * as core from '@actions/core' import * as core from '@actions/core'
import {TestExecutionResult, TestRunResult, TestSuiteResult} from '../test-results' import {TestExecutionResult, TestRunResult, TestSuiteResult} from '../test-results'
import {Align, formatTime, Icon, link, table} from '../utils/markdown-utils' import {Align, formatTime, Icon, link, table} from '../utils/markdown-utils'
import {DEFAULT_LOCALE} from '../utils/node-utils'
import {getFirstNonEmptyLine} from '../utils/parse-utils' import {getFirstNonEmptyLine} from '../utils/parse-utils'
import {slug} from '../utils/slugger' import {slug} from '../utils/slugger'
@@ -79,9 +80,9 @@ function trimReport(lines: string[]): string {
} }
function applySort(results: TestRunResult[]): void { function applySort(results: TestRunResult[]): void {
results.sort((a, b) => a.path.localeCompare(b.path)) results.sort((a, b) => a.path.localeCompare(b.path, DEFAULT_LOCALE))
for (const res of results) { for (const res of results) {
res.suites.sort((a, b) => a.name.localeCompare(b.name)) res.suites.sort((a, b) => a.name.localeCompare(b.name, DEFAULT_LOCALE))
} }
} }

View File

@@ -1,3 +1,5 @@
import {DEFAULT_LOCALE} from './utils/node-utils'
export class TestRunResult { export class TestRunResult {
constructor(readonly path: string, readonly suites: TestSuiteResult[], private totalTime?: number) {} constructor(readonly path: string, readonly suites: TestSuiteResult[], private totalTime?: number) {}
@@ -28,7 +30,7 @@ export class TestRunResult {
} }
sort(deep: boolean): void { sort(deep: boolean): void {
this.suites.sort((a, b) => a.name.localeCompare(b.name)) this.suites.sort((a, b) => a.name.localeCompare(b.name, DEFAULT_LOCALE))
if (deep) { if (deep) {
for (const suite of this.suites) { for (const suite of this.suites) {
suite.sort(deep) suite.sort(deep)
@@ -66,7 +68,7 @@ export class TestSuiteResult {
} }
sort(deep: boolean): void { sort(deep: boolean): void {
this.groups.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '')) this.groups.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '', DEFAULT_LOCALE))
if (deep) { if (deep) {
for (const grp of this.groups) { for (const grp of this.groups) {
grp.sort() grp.sort()
@@ -100,7 +102,7 @@ export class TestGroupResult {
} }
sort(): void { sort(): void {
this.tests.sort((a, b) => a.name.localeCompare(b.name)) this.tests.sort((a, b) => a.name.localeCompare(b.name, DEFAULT_LOCALE))
} }
} }

View File

@@ -1,21 +0,0 @@
import {exec as execImpl, ExecOptions} from '@actions/exec'
// Wraps original exec() function
// Returns exit code and whole stdout/stderr
export default async function exec(commandLine: string, args?: string[], options?: ExecOptions): Promise<ExecResult> {
options = options || {}
let stdout = ''
let stderr = ''
options.listeners = {
stdout: (data: Buffer) => (stdout += data.toString()),
stderr: (data: Buffer) => (stderr += data.toString())
}
const code = await execImpl(commandLine, args, options)
return {code, stdout, stderr}
}
export interface ExecResult {
code: number
stdout: string
stderr: string
}

View File

@@ -1,11 +1,11 @@
import * as core from '@actions/core' import * as core from '@actions/core'
import exec from './exec' import {getExecOutput} from '@actions/exec'
export async function listFiles(): Promise<string[]> { export async function listFiles(): Promise<string[]> {
core.startGroup('Listing all files tracked by git') core.startGroup('Listing all files tracked by git')
let output = '' let output = ''
try { try {
output = (await exec('git', ['ls-files', '-z'])).stdout output = (await getExecOutput('git', ['ls-files', '-z'])).stdout
} finally { } finally {
fixStdOutNullTermination() fixStdOutNullTermination()
core.endGroup() core.endGroup()

View File

@@ -2,7 +2,7 @@ import {createWriteStream} from 'fs'
import * as core from '@actions/core' import * as core from '@actions/core'
import * as github from '@actions/github' import * as github from '@actions/github'
import {GitHub} from '@actions/github/lib/utils' import {GitHub} from '@actions/github/lib/utils'
import {EventPayloads} from '@octokit/webhooks' import type {PullRequest} from '@octokit/webhooks-types'
import * as stream from 'stream' import * as stream from 'stream'
import {promisify} from 'util' import {promisify} from 'util'
import got from 'got' import got from 'got'
@@ -11,7 +11,7 @@ const asyncStream = promisify(stream.pipeline)
export function getCheckRunContext(): {sha: string; runId: number} { export function getCheckRunContext(): {sha: string; runId: number} {
if (github.context.eventName === 'workflow_run') { if (github.context.eventName === 'workflow_run') {
core.info('Action was triggered by workflow_run: using SHA and RUN_ID from triggering workflow') core.info('Action was triggered by workflow_run: using SHA and RUN_ID from triggering workflow')
const event = github.context.payload as EventPayloads.WebhookPayloadWorkflowRun const event = github.context.payload
if (!event.workflow_run) { if (!event.workflow_run) {
throw new Error("Event of type 'workflow_run' is missing 'workflow_run' field") throw new Error("Event of type 'workflow_run' is missing 'workflow_run' field")
} }
@@ -24,7 +24,7 @@ export function getCheckRunContext(): {sha: string; runId: number} {
const runId = github.context.runId const runId = github.context.runId
if (github.context.payload.pull_request) { if (github.context.payload.pull_request) {
core.info(`Action was triggered by ${github.context.eventName}: using SHA from head of source branch`) core.info(`Action was triggered by ${github.context.eventName}: using SHA from head of source branch`)
const pr = github.context.payload.pull_request as EventPayloads.WebhookPayloadPullRequestPullRequest const pr = github.context.payload.pull_request as PullRequest
return {sha: pr.head.sha, runId} return {sha: pr.head.sha, runId}
} }
@@ -41,7 +41,7 @@ export async function downloadArtifact(
try { try {
core.info(`Artifact ID: ${artifactId}`) core.info(`Artifact ID: ${artifactId}`)
const req = octokit.actions.downloadArtifact.endpoint({ const req = octokit.rest.actions.downloadArtifact.endpoint({
...github.context.repo, ...github.context.repo,
artifact_id: artifactId, artifact_id: artifactId,
archive_format: 'zip' archive_format: 'zip'
@@ -86,7 +86,7 @@ export async function downloadArtifact(
export async function listFiles(octokit: InstanceType<typeof GitHub>, sha: string): Promise<string[]> { export async function listFiles(octokit: InstanceType<typeof GitHub>, sha: string): Promise<string[]> {
core.startGroup('Fetching list of tracked files from GitHub') core.startGroup('Fetching list of tracked files from GitHub')
try { try {
const commit = await octokit.git.getCommit({ const commit = await octokit.rest.git.getCommit({
commit_sha: sha, commit_sha: sha,
...github.context.repo ...github.context.repo
}) })
@@ -101,7 +101,7 @@ async function listGitTree(octokit: InstanceType<typeof GitHub>, sha: string, pa
const pathLog = path ? ` at ${path}` : '' const pathLog = path ? ` at ${path}` : ''
core.info(`Fetching tree ${sha}${pathLog}`) core.info(`Fetching tree ${sha}${pathLog}`)
let truncated = false let truncated = false
let tree = await octokit.git.getTree({ let tree = await octokit.rest.git.getTree({
recursive: 'true', recursive: 'true',
tree_sha: sha, tree_sha: sha,
...github.context.repo ...github.context.repo
@@ -109,7 +109,7 @@ async function listGitTree(octokit: InstanceType<typeof GitHub>, sha: string, pa
if (tree.data.truncated) { if (tree.data.truncated) {
truncated = true truncated = true
tree = await octokit.git.getTree({ tree = await octokit.rest.git.getTree({
tree_sha: sha, tree_sha: sha,
...github.context.repo ...github.context.repo
}) })
@@ -121,7 +121,7 @@ async function listGitTree(octokit: InstanceType<typeof GitHub>, sha: string, pa
if (tr.type === 'blob') { if (tr.type === 'blob') {
result.push(file) result.push(file)
} else if (tr.type === 'tree' && truncated) { } else if (tr.type === 'tree' && truncated) {
const files = await listGitTree(octokit, tr.sha, `${file}/`) const files = await listGitTree(octokit, tr.sha as string, `${file}/`)
result.push(...files) result.push(...files)
} }
} }

View File

@@ -1,5 +1,7 @@
import {normalizeFilePath} from './path-utils' import {normalizeFilePath} from './path-utils'
export const DEFAULT_LOCALE = 'en-US'
export function getExceptionSource( export function getExceptionSource(
stackTrace: string, stackTrace: string,
trackedFiles: string[], trackedFiles: string[],

View File

@@ -1,7 +1,6 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"lib": ["ES2019"],
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"outDir": "./lib", /* Redirect output structure to the directory. */ "outDir": "./lib", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */