This repository was archived by the owner on Jan 28, 2026. It is now read-only.
release test #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Split-Module GUI Test Pipeline | |
| on: | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| ############################################################################### | |
| # 1. Playwright tests only | |
| ############################################################################### | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: { cache: npm } | |
| - run: npm install | |
| - name: Playwright tests | |
| uses: DigitalProductInnovationAndDevelopment/Code-Reviews-of-GUI-Tests@v1.0.12 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| mode: test-only | |
| test-files: tests | |
| enable-github-pages: 'false' | |
| enable-dashboard: 'false' | |
| - name: Build JSON summary | |
| run: | | |
| node - <<'EOF' | |
| const fs=require('fs'); | |
| const rpt=JSON.parse(fs.readFileSync('playwright-metrics.json','utf8')); | |
| const out={total:rpt.stats.total, | |
| passed:rpt.stats.passed??rpt.stats.expected,failed:rpt.stats.failed??rpt.stats.unexpected, | |
| skipped:rpt.stats.skipped??0,duration:rpt.stats.duration, | |
| pass_rate:+(((rpt.stats.passed??rpt.stats.expected)/rpt.stats.total)*100).toFixed(2)}; | |
| fs.mkdirSync('artifacts',{recursive:true}); | |
| fs.writeFileSync('artifacts/playwright-summary-pr.json',JSON.stringify(out,null,2)); | |
| fs.copyFileSync('playwright-metrics.json','artifacts/playwright-metrics.json'); | |
| EOF | |
| - uses: actions/upload-artifact@v4 | |
| with: { name: playwright-summary, path: artifacts/playwright-summary-pr.json } | |
| - uses: actions/upload-artifact@v4 | |
| with: { name: playwright-metrics, path: artifacts/playwright-metrics.json } | |
| - uses: actions/upload-artifact@v4 | |
| with: { name: playwright-report, path: artifacts/pr-report/ } | |
| ############################################################################### | |
| # 2. ESLint / Prettier only | |
| ############################################################################### | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: { cache: npm } | |
| - run: npm install | |
| - name: Lint only | |
| uses: DigitalProductInnovationAndDevelopment/Code-Reviews-of-GUI-Tests@v1.0.12 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| mode: lint-only | |
| ############################################################################### | |
| # 3. Dashboard from artifacts | |
| ############################################################################### | |
| dashboard: | |
| needs: [test, lint] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.review.outputs.dashboard-url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install npm if needed | |
| run: | | |
| if [ -f package.json ]; then npm ci 2>/dev/null || npm install; fi | |
| - uses: actions/download-artifact@v4 | |
| with: { name: playwright-summary, path: dl } | |
| - uses: actions/download-artifact@v4 | |
| with: { name: playwright-metrics, path: dl } | |
| - uses: actions/download-artifact@v4 | |
| with: { name: playwright-report, path: dl/pr-report } | |
| - name: Build & deploy dashboard | |
| id: review | |
| uses: DigitalProductInnovationAndDevelopment/Code-Reviews-of-GUI-Tests@v1.0.12 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| mode: dashboard-only | |
| custom-artifacts-path: dl | |
| enable-github-pages: 'true' |