Slice 1 update #9
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: Continuous integration | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| python: | |
| name: Python | |
| runs-on: ubuntu-latest | |
| services: | |
| db: | |
| image: postgres:18 | |
| env: | |
| POSTGRES_DB: hoard | |
| POSTGRES_USER: hoard | |
| POSTGRES_PASSWORD: hoard | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U hoard -d hoard" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:8-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.14" | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --all-groups --locked | |
| - name: Run tests | |
| run: uv run python manage.py test | |
| - name: Check linting | |
| run: uv run ruff check hoard | |
| - name: Check formatting | |
| run: uv run ruff format --check hoard | |
| frontend: | |
| name: Frontend | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Apply automatic fixes | |
| run: npm run fix | |
| - name: Run tests | |
| run: npm run test | |
| - name: Check linting | |
| run: npm run lint | |
| - name: Check formatting | |
| run: npm run format:check | |
| - name: Build frontend | |
| run: npm run build |