Skip to content

Commit

Permalink
add run_unique_id and report_path to outputs (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrybyk authored Feb 2, 2024
1 parent b3cef6b commit 28aff41
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 40 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/report_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
with:
repository: gh-pages-dir
branch: gh-pages
pull_args: --rebase -X ours

- name: Comment PR with Allure Report link
if: ${{ always() && github.event_name == 'pull_request' && steps.self_test.outputs.report_url }}
Expand Down Expand Up @@ -132,6 +133,7 @@ jobs:
with:
repository: gh-pages-dir
branch: gh-pages
pull_args: --rebase -X ours

- name: Comment PR with Allure Report link
if: ${{ always() && github.event_name == 'pull_request' && steps.self_test.outputs.report_url }}
Expand Down Expand Up @@ -187,6 +189,7 @@ jobs:
with:
repository: gh-pages-dir
branch: gh-pages
pull_args: --rebase -X ours

- name: Comment PR with Allure Report link
if: ${{ always() && github.event_name == 'pull_request' && steps.self_test.outputs.report_url }}
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ outputs:
description: 'Number of failed tests'
test_result_total:
description: 'Number of tests in total'
run_unique_id:
description: 'Name of the folder containing the generated Allure Report'
report_path:
description: 'Path to the folder containing the generated Allure Report relative to the repo root'
runs:
using: 'node20'
main: 'dist/index.js'
2 changes: 2 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36936,6 +36936,8 @@ try {
_actions_core__WEBPACK_IMPORTED_MODULE_1__.setOutput('test_result_passed', results.passed);
_actions_core__WEBPACK_IMPORTED_MODULE_1__.setOutput('test_result_failed', results.failed);
_actions_core__WEBPACK_IMPORTED_MODULE_1__.setOutput('test_result_total', results.total);
_actions_core__WEBPACK_IMPORTED_MODULE_1__.setOutput('run_unique_id', runUniqueId);
_actions_core__WEBPACK_IMPORTED_MODULE_1__.setOutput('report_path', reportDir);
if (cleanupEnabled) {
await (0,_src_cleanup_js__WEBPACK_IMPORTED_MODULE_7__/* .cleanupOutdatedBranches */ .B)(ghPagesBaseDir);
await (0,_src_cleanup_js__WEBPACK_IMPORTED_MODULE_7__/* .cleanupOutdatedReports */ .g)(ghPagesBaseDir, maxReports);
Expand Down
2 changes: 2 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ try {
core.setOutput('test_result_passed', results.passed)
core.setOutput('test_result_failed', results.failed)
core.setOutput('test_result_total', results.total)
core.setOutput('run_unique_id', runUniqueId)
core.setOutput('report_path', reportDir)

if (cleanupEnabled) {
await cleanupOutdatedBranches(ghPagesBaseDir)
Expand Down
72 changes: 36 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "allure-report-branch-js-action",
"version": "1.1.1",
"version": "1.1.2",
"description": "Allure Report with history per branch",
"main": "index.js",
"type": "module",
Expand Down Expand Up @@ -33,8 +33,8 @@
"@xhmikosr/decompress-targz": "^7.0.0"
},
"devDependencies": {
"@playwright/test": "^1.41.1",
"@types/node": "^20.11.15",
"@playwright/test": "^1.41.2",
"@types/node": "^20.11.16",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"@vercel/ncc": "^0.38.1",
Expand All @@ -43,7 +43,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"http-server": "^14.1.1",
"husky": "^9.0.9",
"husky": "^9.0.10",
"npm-run-all": "^4.1.5",
"prettier": "^3.2.4",
"typescript": "^5.3.3"
Expand Down

0 comments on commit 28aff41

Please # to comment.