Skip to content

Merge pull request #21 from d-chris/develop #32

Merge pull request #21 from d-chris/develop

Merge pull request #21 from d-chris/develop #32

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: poetry-pytest
on:
workflow_dispatch:
pull_request:
branches: ["main"]
push:
branches: ["main"]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
run: |
poetry install --only main,test
- name: Test with pytest
run: |
poetry run pytest
- name: Save Coverage Report
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}-${{ matrix.os }}
path: coverage.xml
overwrite: true
retention-days: 1
coverage:
runs-on: ubuntu-latest
needs: test
steps:
- name: Restore all Coverage Reports
uses: actions/download-artifact@v4
- name: Upload Coverage Report
uses: codecov/codecov-action@v4
with:
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}