Refactor radio favicon handling and implement polling backoff logic #56
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: Frontend Tests | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main, development] | |
| paths: | |
| - src/renderer/** | |
| - vitest.config.ts | |
| - vitest.browser.config.ts | |
| - package.json | |
| - pnpm-lock.yaml | |
| pull_request: | |
| paths: | |
| - src/renderer/** | |
| - vitest.config.ts | |
| - vitest.browser.config.ts | |
| - package.json | |
| - pnpm-lock.yaml | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install Node and PNPM | |
| uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | |
| - name: Install dependencies | |
| run: pnpm install | |
| # Before the tests: formatting is decided in seconds, the two | |
| # suites plus the Playwright download below take minutes. Checks | |
| # all of src/, not just what a PR touched — that is what catches | |
| # files nobody has opened in a while. | |
| - name: Check formatting | |
| run: pnpm format:check | |
| # With coverage, so the same run that gates the PR also feeds | |
| # the badge — a second, uncovered run would only be slower and | |
| # could disagree with this one. | |
| - name: Run unit tests (jsdom) | |
| run: pnpm test:unit:coverage | |
| # Flagged, because this repository uploads two independent | |
| # reports to one Codecov project (see .github/workflows/ | |
| # test-python.yml for the other). Without flags the second | |
| # upload of a commit looks like a correction of the first and | |
| # the badge shows whichever landed last over its own files | |
| # only. See codecov.yml for the carryforward that keeps a | |
| # backend-only push from reading as "frontend coverage | |
| # vanished" — this workflow deliberately doesn't run for one. | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage/renderer/lcov.info | |
| flags: frontend | |
| # Same reasoning as the backend job's: Codecov being down | |
| # is not a reason to fail a test run. | |
| fail_ci_if_error: false | |
| # Only the layout suite (vitest.browser.config.ts) needs a real | |
| # browser — installed here rather than unconditionally on every | |
| # job so a jsdom-only failure above fails fast without waiting | |
| # on this download first. | |
| - name: Install Playwright Chromium | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Run layout tests (real browser) | |
| run: pnpm test:layout |