| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build --workspace shared | |
| - run: npm run format | |
| - run: npm run lint | |
| - run: npx tsc -p tsconfig.json --noEmit | |
| - run: npm test | |
| - run: npm run test:extension | |
| - uses: astral-sh/setup-uv@v5 | |
| - run: npm run test:extension:native | |
| - run: npm run coverage | |
| - run: npm run dry | |
| - run: npm run mutate | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| - name: Check shared | |
| run: | | |
| npm run format --workspace shared | |
| npm run lint --workspace shared | |
| npm run typecheck --workspace shared | |
| npm run test --workspace shared | |
| npm run coverage --workspace shared | |
| npm run dry --workspace shared | |
| if [ "$RUN_MUTATION_TESTS" = "true" ]; then | |
| npm run mutate --workspace shared | |
| fi | |
| env: | |
| RUN_MUTATION_TESTS: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| - name: Check space | |
| run: | | |
| npm run format --workspace space | |
| npm run lint --workspace space | |
| npm run typecheck --workspace space | |
| npm run test --workspace space | |
| npm run coverage --workspace space | |
| npm run dry --workspace space | |
| if [ "$RUN_MUTATION_TESTS" = "true" ]; then | |
| npm run mutate --workspace space | |
| fi | |
| env: | |
| RUN_MUTATION_TESTS: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| - name: Check explorer | |
| run: | | |
| npm run format --workspace explorer | |
| npm run lint --workspace explorer | |
| npm run typecheck --workspace explorer | |
| npm run test --workspace explorer | |
| npm run coverage --workspace explorer | |
| npm run dry --workspace explorer | |
| if [ "$RUN_MUTATION_TESTS" = "true" ]; then | |
| npm run mutate --workspace explorer | |
| fi | |
| env: | |
| RUN_MUTATION_TESTS: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| - name: Check setup | |
| run: | | |
| npm run format --workspace setup | |
| npm run lint --workspace setup | |
| npm run typecheck --workspace setup | |
| npm run test --workspace setup | |
| npm run coverage --workspace setup | |
| npm run dry --workspace setup | |
| if [ "$RUN_MUTATION_TESTS" = "true" ]; then | |
| npm run mutate --workspace setup | |
| fi | |
| env: | |
| RUN_MUTATION_TESTS: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| - run: npm run build --workspace explorer && npm run build --workspace space && npm run build --workspace setup | |
| - name: Slophammer | |
| uses: osolmaz/slophammer@main | |
| with: | |
| checker: ts | |
| version: 0.4.1 | |