Minimal requirements for Streamlit Cloud #17
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: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: Checkout | |
| - uses: actions/setup-python@v4 | |
| name: Set up Python | |
| with: | |
| python-version: '3.12' | |
| - uses: actions/cache@v4 | |
| name: Cache pip | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Install test tools | |
| run: | | |
| pip install pytest yamllint flake8 mypy | |
| - uses: ibiqlik/action-yamllint@v3 | |
| name: YAML lint | |
| with: | |
| file_or_dir: . | |
| - name: Import smoke test | |
| env: | |
| PYTHONPATH: ${{ github.workspace }} | |
| GEMINI_API_KEY: "dummy_key_for_ci" | |
| run: | | |
| python -c "import backend; print('backend OK')" | |
| - name: Run tests | |
| continue-on-error: true | |
| env: | |
| PYTHONPATH: ${{ github.workspace }} | |
| GEMINI_API_KEY: "dummy_key_for_ci" | |
| run: pytest -q | |
| compose-validate: | |
| runs-on: ubuntu-latest | |
| needs: lint-and-test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Validate docker-compose | |
| run: docker compose -f docker-compose.yml config |