Skip to content

ci-tests

ci-tests #391

Workflow file for this run

name: ci-tests
on: push
jobs:
all_checks:
name: Run all tests, lints, etc. (Python 3.11)
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
requirements-ci.txt
requirements-flake8.txt
- name: Update pip & setuptools
run: python -m pip install -U pip setuptools
- name: Install & report CI dependencies
run: |
python -m pip install -U --force-reinstall -r requirements-ci.txt -r requirements-flake8.txt
python --version
pip list
- name: Build docs
run: |
cd doc
make html
mkdir scratch
- name: Run tests & report source coverage
run: |
pytest --cov --testall --nonloc
tox -e sdist_install
- name: Run doctests
run: |
cd doc
make doctest
- name: Run docs link check
run: |
cd doc
make linkcheck
- name: Lint code
run: tox -e flake8
- name: Transmit to Codecov
run: codecov
just_tests:
name: Run only the test suite
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.12']
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: |
requirements-ci.txt
requirements-flake8.txt
- name: Update pip & setuptools
run: python -m pip install -U pip setuptools
- name: Install & report CI dependencies
run: |
python -m pip install -U --force-reinstall -r requirements-ci.txt
python --version
pip list
- name: Build docs
run: |
cd doc
make html
mkdir scratch
- name: Run tests & report source coverage
run: |
pytest --cov --testall --nonloc
tox -e sdist_install