refactor: revamp GH actions #631
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/[email protected] | |
- uses: pnpm/[email protected] | |
with: | |
version: 9 | |
run_install: false | |
- uses: actions/[email protected] | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: Install deps | |
run: pnpm install --frozen-lockfile | |
- name: Type Check | |
run: pnpm ts | |
- name: Install Playwright browsers | |
run: pnpx 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() }} |