Make GitHub Actions enforce pre-commit clean code (#16) #183
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: | |
| push: | |
| schedule: | |
| - cron: '0 5 * * 1' # Every Monday at 5am | |
| workflow_dispatch: | |
| jobs: | |
| build-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [3.11, 3.13] # oldest and most recent, no need for in-between | |
| runs-on: ubuntu-latest | |
| container: python:${{ matrix.python-version }} | |
| services: | |
| redis: | |
| image: redis | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: | | |
| set -ex | |
| curl -sSL https://install.python-poetry.org | python3 - | |
| $HOME/.local/bin/poetry install | |
| - name: Install playwright | |
| run: | | |
| set -ex | |
| $HOME/.local/bin/poetry run playwright install chromium --with-deps | |
| - name: Test with pytest | |
| env: | |
| REDIS_URL: redis://redis:6379/0 | |
| run: | | |
| set -ex | |
| $HOME/.local/bin/poetry run pytest --cov=. |