Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit ae85268

Browse files
committed
release test
1 parent 0d19678 commit ae85268

1 file changed

Lines changed: 30 additions & 38 deletions

File tree

.github/workflows/releasetest.yaml

Lines changed: 30 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: Split-Module GUI Test Pipeline
22

33
on:
44
pull_request:
5-
branches: [main]
5+
branches: [ main ]
66

7-
# ───────────────────────────────────────────────────────────────
8-
# 1. Playwright tests → artefacts (no Pages)
9-
# ───────────────────────────────────────────────────────────────
107
jobs:
8+
# ───────────────────────────────────────────
9+
# 1. Playwright tests → artifacts only
10+
# ───────────────────────────────────────────
1111
test:
1212
runs-on: ubuntu-latest
1313
steps:
@@ -18,7 +18,7 @@ jobs:
1818
cache: npm
1919
- run: npm install
2020

21-
# Playwright only dashboard & lint disabled here
21+
# Playwright only (dashboard off here)
2222
- name: GUI Test – Playwright only
2323
uses: DigitalProductInnovationAndDevelopment/Code-Reviews-of-GUI-Tests@v1.0.12
2424
with:
@@ -28,24 +28,24 @@ jobs:
2828
enable-dashboard: 'false'
2929
enable-github-pages: 'false'
3030

31-
# build playwright-summary AFTER the action moved metrics → artifacts/
31+
# Build correct summary JSON — reads *after* action moved metrics
3232
- name: Build playwright-summary-pr.json
3333
run: |
3434
node - <<'EOF'
3535
const fs = require('fs');
3636
const rpt = JSON.parse(fs.readFileSync('artifacts/playwright-metrics.json','utf8'));
3737
const out = {
38-
total: rpt.stats.tests,
39-
passed: rpt.stats.passed,
40-
failed: rpt.stats.failed ?? rpt.stats.unexpected ?? 0,
41-
skipped: rpt.stats.skipped ?? 0,
42-
duration: rpt.stats.duration,
43-
pass_rate: +((rpt.stats.passed / rpt.stats.tests) * 100).toFixed(2)
38+
total: rpt.stats.tests,
39+
passed: rpt.stats.passed,
40+
failed: rpt.stats.failed,
41+
skipped: rpt.stats.skipped,
42+
duration: rpt.stats.duration,
43+
pass_rate: +(rpt.stats.tests ? (rpt.stats.passed / rpt.stats.tests) * 100 : 0).toFixed(2)
4444
};
4545
fs.writeFileSync('artifacts/playwright-summary-pr.json', JSON.stringify(out, null, 2));
4646
EOF
4747
48-
# upload three artefacts used by dashboard job
48+
# Upload three artifacts for dashboard job
4949
- uses: actions/upload-artifact@v4
5050
with:
5151
name: playwright-summary
@@ -61,9 +61,9 @@ jobs:
6161
name: playwright-report
6262
path: artifacts/pr-report/
6363

64-
# ───────────────────────────────────────────────────────────────
65-
# 2. ESLint / Prettier
66-
# ───────────────────────────────────────────────────────────────
64+
# ───────────────────────────────────────────
65+
# 2. ESLint / Prettier → lint-summary.json
66+
# ───────────────────────────────────────────
6767
lint:
6868
runs-on: ubuntu-latest
6969
steps:
@@ -79,18 +79,18 @@ jobs:
7979
github-token: ${{ secrets.GITHUB_TOKEN }}
8080
mode: lint-only
8181

82-
# upload lint-summary.json so dashboard can read real numbers
83-
- name: Upload lint summary
82+
# Upload lint summary for dashboard
83+
- name: Upload lint-summary.json
8484
uses: actions/upload-artifact@v4
8585
with:
8686
name: lint-summary
8787
path: artifacts/lint-summary.json
8888

89-
# ───────────────────────────────────────────────────────────────
90-
# 3. Dashboard / checklist / flow-chart / PR comment / Pages
91-
# ───────────────────────────────────────────────────────────────
89+
# ───────────────────────────────────────────
90+
# 3. Dashboard / PR comment / Pages deploy
91+
# ───────────────────────────────────────────
9292
dashboard:
93-
needs: [test, lint]
93+
needs: [ test, lint ]
9494
runs-on: ubuntu-latest
9595

9696
permissions:
@@ -106,33 +106,25 @@ jobs:
106106
steps:
107107
- uses: actions/checkout@v4
108108

109-
- name: Install npm if repo has package.json
109+
- name: Install npm only if needed
110110
run: |
111111
if [ -f package.json ]; then
112112
npm ci 2>/dev/null || npm install
113113
fi
114114
115-
# download all artefacts produced in previous jobs
115+
# Download all artifacts
116116
- uses: actions/download-artifact@v4
117-
with:
118-
name: playwright-summary
119-
path: dl
117+
with: { name: playwright-summary, path: dl }
120118
- uses: actions/download-artifact@v4
121-
with:
122-
name: playwright-metrics
123-
path: dl
119+
with: { name: playwright-metrics, path: dl }
124120
- uses: actions/download-artifact@v4
125-
with:
126-
name: playwright-report
127-
path: dl/pr-report
121+
with: { name: playwright-report, path: dl/pr-report }
128122
- uses: actions/download-artifact@v4
129-
with:
130-
name: lint-summary
131-
path: dl
123+
with: { name: lint-summary, path: dl }
132124

133-
# build dashboard, flow-chart, checklist, PR comment, deploy Pages
125+
# Build dashboard (flow-chart + checklist inside)
134126
- id: review
135-
name: Build dashboard & deploy
127+
name: Dashboard / PR comment / Pages deploy
136128
uses: DigitalProductInnovationAndDevelopment/Code-Reviews-of-GUI-Tests@v1.0.12
137129
with:
138130
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)