Skip to content

Test

Test #48

Workflow file for this run

name: Test
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: 0 0 1 * * # monthly
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
# see https://github.com/actions/setup-python/issues/374
- name: Set the Python version for Poetry
run: poetry env use ${{ matrix.python-version }}
- name: Install dependencies
run: poetry install --no-interaction
- name: Run tests
run: poetry run pytest --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true