Skip to content

Update test structure for Stahl20 tests #11

Update test structure for Stahl20 tests

Update test structure for Stahl20 tests #11

Workflow file for this run

name: Test Package
on:
workflow_dispatch:
workflow_call:
push:
jobs:
run-tests:
name: Run Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
pip install poetry
poetry env use python${{ matrix.python-version }}
- name: Install dependencies
run: poetry install --with tests
- name: Run tests with coverage
run: |
poetry run coverage run -m unittest discover
poetry run coverage report --omit="tests/*"
poetry run coverage xml --omit="tests/*" -o coverage.xml
# Use this job for branch protection rules
report-test-status:
name: Report Test Status
if: always()
needs: run-tests
runs-on: ubuntu-latest
steps:
- name: Check build status
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1