Skip to content

Commit

Permalink
Fix copy history (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrybyk authored Aug 1, 2024
1 parent ba8e017 commit 6386906
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 64 deletions.
5 changes: 4 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29669,7 +29669,10 @@ try {
// process allure report
const lastRunId = await (0,_src_allure_js__WEBPACK_IMPORTED_MODULE_5__/* .getLastRunId */ .k4)(reportBaseDir);
if (lastRunId) {
await _actions_io__WEBPACK_IMPORTED_MODULE_3__.cp(path__WEBPACK_IMPORTED_MODULE_0__.join(reportBaseDir, lastRunId, 'history'), sourceReportDir, { recursive: true });
const historyDir = path__WEBPACK_IMPORTED_MODULE_0__.join(reportBaseDir, lastRunId, 'history');
if (await (0,_src_isFileExists_js__WEBPACK_IMPORTED_MODULE_6__/* .isFileExist */ .e)(historyDir)) {
await _actions_io__WEBPACK_IMPORTED_MODULE_3__.cp(historyDir, sourceReportDir, { recursive: true });
}
}
await (0,_src_allure_js__WEBPACK_IMPORTED_MODULE_5__/* .writeExecutorJson */ .sp)(sourceReportDir, {
runUniqueId,
Expand Down
5 changes: 4 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ try {
// process allure report
const lastRunId = await getLastRunId(reportBaseDir)
if (lastRunId) {
await io.cp(path.join(reportBaseDir, lastRunId, 'history'), sourceReportDir, { recursive: true })
const historyDir = path.join(reportBaseDir, lastRunId, 'history')
if (await isFileExist(historyDir)) {
await io.cp(historyDir, sourceReportDir, { recursive: true })
}
}
await writeExecutorJson(sourceReportDir, {
runUniqueId,
Expand Down
114 changes: 57 additions & 57 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "allure-report-branch-action",
"version": "1.4.4",
"version": "1.4.5",
"description": "Allure Report with history per branch",
"main": "index.js",
"type": "module",
Expand Down Expand Up @@ -32,16 +32,16 @@
},
"devDependencies": {
"@playwright/test": "^1.45.3",
"@types/node": "^20.14.11",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"@types/node": "^20.14.13",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vercel/ncc": "^0.38.1",
"allure-playwright": "^2.15.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"http-server": "^14.1.1",
"husky": "^9.1.1",
"husky": "^9.1.4",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.3",
"typescript": "^5.5.4"
Expand Down

0 comments on commit 6386906

Please sign in to comment.