Merge pull request #26 from radiantlab/additional-ci-checks #115
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: ci | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| push: | |
| branches: [ "main" ] | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| backend-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install UV | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Install dependencies | |
| working-directory: ./svc | |
| run: uv sync --frozen | |
| - name: Run tests | |
| working-directory: ./svc | |
| run: uv run pytest tests/ -v | |
| frontend-checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: web/package-lock.json | |
| - name: Install frontend dependencies | |
| working-directory: ./web | |
| run: npm ci | |
| - name: Run frontend tests | |
| working-directory: ./web | |
| run: npm run test | |
| - name: Run frontend typecheck | |
| working-directory: ./web | |
| run: npm run typecheck | |
| - name: Build frontend | |
| working-directory: ./web | |
| run: npm run build |