Skip to content

Add Python 3.11 testing #35

Add Python 3.11 testing

Add Python 3.11 testing #35

Workflow file for this run

name: Build and run tests
on:
push:
pull_request:
env:
PKG_NAME: transforms3d
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: 3.7
pip_dep_var: "-r test-requirements.txt"
- python-version: 3.8
pip_dep_var: "-r test-requirements.txt"
- python-version: 3.9
pip_dep_var: "-r test-requirements.txt"
- python-version: "3.10"
pip_dep_var: "-r test-requirements.txt"
- python-version: "3.11"
pip_dep_var: "-r test-requirements.txt"
- python-version: 3.7
# Minimum dependencies; check against test-requirements.txt
pip_dep_var: "numpy==1.15 sympy scipy"
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install specified dependencies
run: pip install $PIP_DEPENDS
env:
PIP_DEPENDS: ${{ matrix.pip_dep_var }}
- name: Install coverage dependencies
run: |
pip install pytest-cov
- name: Install package
run: |
pip install .
- name: Run tests
run: |
mkdir tmp
cd tmp
pytest --log-level DEBUG --cov-config=../.coveragerc --cov=$PKG_NAME --doctest-modules --pyargs $PKG_NAME
- name: Collect code coverage data
run: |
coverage xml --data-file=tmp/.coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true