55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: unit-tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
unit-tests:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
python-version: ["3.8.18", "3.9.18", "3.10.13", "3.11.5"]
|
|
# Windows is a bit behind on Python version availability in Github
|
|
exclude:
|
|
- os: windows-latest
|
|
python-version: "3.10.13"
|
|
- os: windows-latest
|
|
python-version: "3.9.18"
|
|
- os: windows-latest
|
|
python-version: "3.8.18"
|
|
include:
|
|
- os: windows-latest
|
|
python-version: "3.10.11"
|
|
- os: windows-latest
|
|
python-version: "3.9.13"
|
|
- os: windows-latest
|
|
python-version: "3.8.10"
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup_build_env
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
run-poetry-install: true
|
|
create-venv-at-path: .venv
|
|
- name: Run unit tests
|
|
run: |
|
|
export PYTHONUNBUFFERED=1
|
|
poetry run pytest tests --cov --no-cov-on-fail --cov-report=
|
|
- run: poetry run coverage html
|