Repository navigation
Update README.md #57
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", "copilot/**"] | |
| pull_request: | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
| restore-keys: ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Lint (flake8) | |
| run: flake8 app/ tests/ streamlit_app.py --max-line-length=100 | |
| - name: Format check (black) | |
| run: black --check app/ tests/ streamlit_app.py --line-length=100 | |
| - name: Type check (mypy) | |
| run: mypy app/ --ignore-missing-imports | |
| - name: Security scan (bandit) | |
| run: bandit -r app/ -ll -q | |
| - name: Run unit tests | |
| run: pytest tests/test_recommender.py -v --tb=short | |
| - name: Run API smoke tests | |
| run: pytest tests/test_smoke_api.py -v --tb=short |