Repository navigation
Feat/reliability and tests #172
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: Backend CI | |
| on: [push, pull_request] | |
| jobs: | |
| lint-and-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: pip install -r backend/requirements-dev.txt | |
| - name: Run tests | |
| # Throwaway SQLite DB, no API keys, no network - see tests/conftest.py. | |
| run: cd backend && python -m pytest tests -q | |
| - name: Check imports | |
| run: cd backend && python -c "from app.main import app; print('✅ App imports successfully')" | |
| docker-build: | |
| needs: lint-and-build | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: docker build -t stackradar-backend:latest ./backend |