@estruyf/github-actions-reporter
Advanced tools
Comparing version
@@ -5,2 +5,7 @@ # Changelog | ||
## [1.3.0] | ||
- Added warning test icon | ||
- Added `skipped` status | ||
## [1.2.0] | ||
@@ -7,0 +12,0 @@ |
@@ -39,3 +39,6 @@ "use strict"; | ||
const getTableRows_1 = require("./utils/getTableRows"); | ||
const checkForFailedTests_1 = require("./utils/checkForFailedTests"); | ||
const getTestStatusIcon_1 = require("./utils/getTestStatusIcon"); | ||
const summary_1 = require("@actions/core/lib/summary"); | ||
const path_2 = require("path"); | ||
const fs_1 = require("fs"); | ||
class GitHubAction { | ||
@@ -55,2 +58,11 @@ constructor(options = {}) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (process.env.NODE_ENV === "development") { | ||
const summaryFile = (0, path_2.join)(__dirname, "../summary.html"); | ||
if ((0, fs_1.existsSync)(summaryFile)) { | ||
(0, fs_1.unlinkSync)(summaryFile); | ||
} | ||
(0, fs_1.writeFileSync)(summaryFile, "", "utf-8"); | ||
process.env[summary_1.SUMMARY_ENV_VAR] = summaryFile; | ||
process.env.GITHUB_ACTIONS = "true"; | ||
} | ||
if (process.env.GITHUB_ACTIONS && this.suite) { | ||
@@ -88,4 +100,4 @@ const os = process.platform; | ||
// Check if there are any failed tests | ||
const hasFailedTests = (0, checkForFailedTests_1.checkForFailedTests)(tests[filePath]); | ||
summary.addDetails(`${hasFailedTests ? "❌" : "✅"} ${fileName} (${os}${project.name ? ` / ${project.name}` : ""})`, content); | ||
const testStatusIcon = (0, getTestStatusIcon_1.getTestStatusIcon)(tests[filePath]); | ||
summary.addDetails(`${testStatusIcon} ${fileName} (${os}${project.name ? ` / ${project.name}` : ""})`, content); | ||
} | ||
@@ -92,0 +104,0 @@ else { |
@@ -8,2 +8,3 @@ "use strict"; | ||
const ansi_to_html_1 = __importDefault(require("ansi-to-html")); | ||
const getTestStatus_1 = require("./getTestStatus"); | ||
const getHtmlTable = (tests, showError) => { | ||
@@ -31,3 +32,3 @@ const convert = new ansi_to_html_1.default(); | ||
content.push(`<td>${test.title}</td>`); | ||
content.push(`<td>${result.status === "passed" ? "✅ Pass" : "❌ Fail"}</td>`); | ||
content.push(`<td>${(0, getTestStatus_1.getTestStatus)(result)}</td>`); | ||
content.push(`<td>${result.duration / 1000}s</td>`); | ||
@@ -34,0 +35,0 @@ content.push(`<td>${result.retry}</td>`); |
@@ -8,2 +8,3 @@ "use strict"; | ||
const ansi_to_html_1 = __importDefault(require("ansi-to-html")); | ||
const getTestStatus_1 = require("./getTestStatus"); | ||
const getTableRows = (tests, showError) => { | ||
@@ -45,3 +46,3 @@ const convert = new ansi_to_html_1.default(); | ||
{ | ||
data: result.status === "passed" ? "✅ Pass" : "❌ Fail", | ||
data: (0, getTestStatus_1.getTestStatus)(result), | ||
header: false, | ||
@@ -48,0 +49,0 @@ }, |
{ | ||
"name": "@estruyf/github-actions-reporter", | ||
"version": "1.2.0", | ||
"version": "1.3.0-beta.6159832", | ||
"description": "GitHub Actions reporter for Playwright", | ||
@@ -9,3 +9,4 @@ "main": "dist/index.js", | ||
"watch": "tsc -w", | ||
"test": "npx playwright test" | ||
"test": "NODE_ENV=development npx playwright test", | ||
"test:local": "act -j testing -P ubuntu-latest=catthehacker/ubuntu:act-latest --container-architecture linux/amd64 --env GITHUB_STEP_SUMMARY='/dev/stdout'" | ||
}, | ||
@@ -44,2 +45,2 @@ "author": "Elio Struyf <elio@struyfconsulting.be>", | ||
} | ||
} | ||
} |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
14439
13.16%9
12.5%269
19.03%1
Infinity%5
400%