Run tests on commits to main branch #105
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: Check | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm & install | |
| uses: wyvox/action-setup-pnpm@v3 | |
| with: | |
| node-version: 22 | |
| - name: Run type checking and formatting | |
| run: pnpm run check | |
| - name: Run unit tests | |
| run: pnpm run test:unit | |
| - name: Build | |
| run: pnpm build | |
| e2e: | |
| runs-on: ubuntu-latest | |
| needs: check | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm & install | |
| uses: wyvox/action-setup-pnpm@v3 | |
| with: | |
| node-version: 22 | |
| - name: Build | |
| run: pnpm build | |
| - name: Run E2E tests | |
| run: cd test && pnpm install && pnpm test |