Skip to content

Update test parameters #132

Update test parameters

Update test parameters #132

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://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: pytest
on:
push:
branches: [master, dev-gha]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
extras: ["[diagrams]"]
include:
- python-version: "3.12"
extras: "[]"
- python-version: "3.12"
extras: "[diagrams,mypy]"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -U -r requirements_test.txt
- name: Install dependencies for diagrams
if: contains(matrix.extras, 'diagrams')
run: |
sudo apt-get install libgraphviz-dev graphviz
python -m pip install -r requirements.txt -r requirements_diagrams.txt
- name: Install dependencies for mypy
if: contains(matrix.extras, 'mypy')
run: |
python -c "print 'hello'" > /dev/null 2>&1 || pip install -r requirements_mypy.txt
- name: Test with pytest
run: |
coverage run --source=transitions -m pytest --doctest-modules tests/
coverage xml --ignore-errors
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
name: codecov-umbrella
verbose: true