refactor: usability / DX fixes (#283) #625
This file contains 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: CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/**' | |
- 'tests/**' | |
- 'pnpm-lock.yaml' | |
- '.github/workflows/main.yml' | |
pull_request: | |
paths: | |
- 'src/**' | |
- 'tests/**' | |
- 'pnpm-lock.yaml' | |
- '.github/workflows/main.yml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
env: | |
PLAYWRIGHT_BROWSERS_PATH: 0 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: /home/runner/.local/share/pnpm/store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
run_install: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: Type Check | |
run: pnpm type-check | |
- name: Install Playwright browsers | |
run: npx playwright install --with-deps | |
- name: Run e2e tests | |
run: | | |
pnpm build | |
pnpm test:ci-e2e | |
- name: Run unit tests | |
run: pnpm test:ci | |
- name: Coverage | |
uses: davelosert/[email protected] | |
if: ${{ always() }} |