Add test suite #3
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: test | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| # The core tiers install nothing, so this job is fast and cannot be broken | |
| # by a registry outage. It is also the job that proves a bare checkout works: | |
| # there is no ipplan database here, so the real-data tests skip. | |
| core: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: JS logic | |
| run: make test-unit | |
| - name: Python, servers and fake backend | |
| run: make test-py | |
| # jsdom, Playwright and a browser. Uses the same image as test/podman.sh so | |
| # local and CI runs are the same environment. | |
| browser: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: mcr.microsoft.com/playwright:v1.62.0-noble | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: npm ci --no-audit --no-fund | |
| - name: Menu under jsdom | |
| run: node --test "test/dom/*.test.js" | |
| - name: Full app in chromium | |
| run: npx playwright test | |
| - if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: | | |
| playwright-report/ | |
| test-results/ | |
| retention-days: 7 |