Skip to content

Add workflow for tests in GitHub (#4) #2

Add workflow for tests in GitHub (#4)

Add workflow for tests in GitHub (#4) #2

Workflow file for this run

name: Run Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, '3.10', 3.11, 3.12]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies with Poetry
run: |
pip install poetry
poetry install
- name: Run Tests with Coverage
if: ${{ matrix.python-version == 3.12 }}
run: |
poetry run coverage run --source ./pydhn -m unittest -b
poetry run coverage report -m
- name: Run Tests
if: ${{ matrix.python-version != 3.12 }}
run: |
poetry run python -m unittest -b