Merge pull request #13 from TomMaSS/multiuser #13
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: Tests | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_USER: prdforge | |
| POSTGRES_PASSWORD: prdforge | |
| POSTGRES_DB: prdforge | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 5s | |
| --health-timeout 3s | |
| --health-retries 10 | |
| env: | |
| DATABASE_URL: postgresql://prdforge:prdforge@localhost:5432/prdforge | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install Python dependencies | |
| run: pip install -r tests/requirements.txt | |
| - name: Install frontend dependencies | |
| run: | | |
| cd frontend | |
| corepack enable | |
| yarn install --immutable | |
| - name: Apply database migrations | |
| run: | | |
| for f in db/*.sql; do | |
| echo "Applying $f..." | |
| PGPASSWORD=prdforge psql -h localhost -U prdforge -d prdforge -f "$f" | |
| done | |
| - name: Run Python tests | |
| run: python -m pytest tests/test_mcp_tools.py tests/test_ui_api.py -v --tb=short | |
| - name: Run frontend checks | |
| run: | | |
| cd frontend | |
| yarn lint | |
| yarn typecheck | |
| yarn test --run |