Repository navigation
Update changelog.md #84
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
| # Continuous integration for Able Player | |
| # | |
| # Runs ESLint and both Jest projects (jsdom + puppeteer) on every push and | |
| # pull request. The puppeteer project runs headless with request | |
| # interception, so no demo server is needed. Build artifacts are compiled | |
| # to confirm Grunt + Rollup succeed, but are never committed (per | |
| # contributing.md). | |
| # | |
| # The accessibility job runs axe-core (WCAG 2.1 A/AA rules) plus keyboard | |
| # operability checks over a representative demo set at four viewports | |
| # (320px -> 4K). Automated checks catch only a fraction of WCAG failures — | |
| # a green run prevents a class of regressions; it is not a conformance claim. | |
| name: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| # Superseded runs on the same ref are cancelled, so a force-push to an open | |
| # pull request does not leave stale jobs occupying the queue. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: ESLint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| # Only the puppeteer job launches a browser; skip puppeteer's Chromium | |
| # download elsewhere (setup-node's npm cache does not cover it). | |
| - run: npm ci | |
| env: | |
| PUPPETEER_SKIP_DOWNLOAD: "1" | |
| - run: npm run lint | |
| test: | |
| name: Jest (jsdom) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| env: | |
| PUPPETEER_SKIP_DOWNLOAD: "1" | |
| # webvtt.test.cjs loads build/test/webvtt.umd.js, so the suite must run | |
| # against a fresh build rather than the committed bundle — otherwise a | |
| # change to the WebVTT source is never actually exercised. | |
| - run: npm run build | |
| - run: npx jest --selectProjects jsdom | |
| test-browser: | |
| name: Jest (puppeteer, headless) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| # validate.test.cjs loads build/test/validate.umd.js | |
| - run: npm run build | |
| - run: npx jest --selectProjects puppeteer | |
| build: | |
| name: Build (Grunt + Rollup) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| env: | |
| PUPPETEER_SKIP_DOWNLOAD: "1" | |
| - run: npm run build | |
| - name: Confirm build outputs exist | |
| run: | | |
| test -s build/ableplayer.js | |
| test -s build/ableplayer.min.js | |
| test -s build/ableplayer.esm.js | |
| test -s build/ableplayer.min.css | |
| a11y: | |
| name: Accessibility (axe + keyboard, 320px-4K) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| # The demo pages load ../build/ableplayer.dist.js + ableplayer.min.css, | |
| # so the suite always scans a fresh build, never a stale committed one. | |
| - run: npm run build | |
| - run: npx playwright install --with-deps chromium | |
| # e2e/serve.mjs serves the repo root so the demos' relative ../build and | |
| # ../media references resolve; Playwright boots it via playwright.config.js. | |
| - run: npm run test:a11y | |
| - name: Upload Playwright report on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: a11y-playwright-report | |
| path: playwright-report/ | |
| retention-days: 14 |