Skip to content

Try consolidating the 'if' expression #29

Try consolidating the 'if' expression

Try consolidating the 'if' expression #29

name: 'ALL: Run tests on current Python'
on:
- push
- pull_request
jobs:
current_python_tests:
name: Run on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
if: ${{ ! github.event_name == 'push' }}
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: requirements-ci.txt
- name: Update pip
run: python -m pip install -U pip
- 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