Skip to content

Bump up setup-python action version; exclude macos-latest+python3.7 #351

Bump up setup-python action version; exclude macos-latest+python3.7

Bump up setup-python action version; exclude macos-latest+python3.7 #351

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: build
on:
push:
branches: [ master, future ]
pull_request:
jobs:
# Run tests on different versions of python
unittest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
- os: macos-latest
python-version: "3.7"
steps:
- uses: actions/checkout@v2
- 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
pip install .[dev]
- name: Test with pytest
env:
MPLBACKEND: TkAgg
run: |
pytest -s --ignore=W605 --timeout=50 --timeout_method=thread
codecov:
# If all tests pass:
# Run coverage and upload to codecov
needs: unittest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Run coverage
run: |
coverage run --omit='tests/*.py,tests/base/*.py' -m pytest
coverage report
coverage xml
- name: upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
sphinx:
# If the above worked:
# Build docs and upload to GH Pages
needs: unittest
uses: ./.github/workflows/sphinx.yml