Update README.md #3
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| backend: | |
| name: Backend tests | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_DB: testdb | |
| POSTGRES_USER: test | |
| POSTGRES_PASSWORD: test | |
| options: >- | |
| --health-cmd "pg_isready -U test -d testdb" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install dependencies | |
| working-directory: backend | |
| run: pip install -r requirements.txt | |
| - name: Lint with ruff | |
| working-directory: backend | |
| run: | | |
| pip install ruff | |
| ruff check app/ | |
| - name: Run tests | |
| working-directory: backend | |
| env: | |
| DATABASE_URL: postgresql+asyncpg://test:test@localhost:5432/testdb | |
| run: pytest -x -q | |
| frontend: | |
| name: Frontend build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: frontend/.nvmrc | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| working-directory: frontend | |
| run: npm ci | |
| - name: Type check | |
| working-directory: frontend | |
| run: npx tsc --noEmit | |
| - name: Build | |
| working-directory: frontend | |
| run: npm run build |