Skip to content

add test reqs to setup.py #13

add test reqs to setup.py

add test reqs to setup.py #13

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"]
include:
- python-version: "3.12"
extras: "[mypy]"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
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 mypy
if: contains(matrix.extras, 'mypy')
run: |
pip install mypy
- name: Test with pytest
run: |
coverage run -m pytest --doctest-modules tests/
coverage lcov --ignore-errors
- name: Coveralls Parallel
if: contains(matrix.extras, 'mypy')
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true