Spaces:
Sleeping
Sleeping
| name: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| jobs: | |
| tests: | |
| name: tests_CI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: "2.0.0" | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Install dependencies (with dev) | |
| run: poetry install --no-interaction --no-ansi --with dev | |
| - name: Tests + Coverage | |
| env: | |
| API_KEY: "ci-test-key" | |
| DATABASE_URL: "sqlite+pysqlite:////tmp/test.db" | |
| run: | | |
| poetry run pytest -q \ | |
| --cov=app --cov=service \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml \ | |
| --cov-report=html | |
| - name: Upload coverage HTML | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-html | |
| path: htmlcov/ | |