Test #361
This file contains 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: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '30 5 * * 6' | |
jobs: | |
test: | |
name: Tests | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v4 | |
- name: "Set up Python" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: "Set up Poetry" | |
uses: abatilo/actions-poetry@v2 | |
- name: "Set up virtual environment for Poetry" | |
run: | | |
poetry config virtualenvs.create true --local | |
poetry config virtualenvs.in-project true --local | |
- name: "Cache the virtual environment" | |
uses: actions/cache@v4 | |
with: | |
path: ./.venv | |
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} | |
- name: "Install" | |
run: poetry install | |
- name: "Run pytest" | |
run: poetry run pytest test -m "not heavy" |