Bump actions/setup-python from 3 to 5 #687
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 40 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
include: | |
- os: macos-latest | |
python-version: "3.12" | |
env: | |
DEBUG_TEST_PYFLYBY: 1 | |
ENVNAME: ${{matrix.os}}-${{matrix.python-version}} | |
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 and update Python dependencies on Python 3 | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install --upgrade "pexpect>=3.3" 'pytest<=8' rlipython 'ipykernel>=5.4.3' requests jupyter flaky 'notebook<6.1' wheel 'jupyter_console>=6.2' pytest-cov ipython coverage pytest-json-report | |
pip install -e . | |
- name: test release build | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: compileall | |
run: | | |
python -We:invalid -m compileall -f -q lib/ etc/; | |
- name: pytest Mac OS | |
if: ${{ matrix.os == 'macos-latest'}} | |
# json report can't be installed on Py2, and make macos super slow. | |
run: | | |
python -m pytest -v --cov=pyflyby --cov-report=xml --doctest-modules --maxfail=3 lib tests | |
- name: pytest (not MacOS) | |
if: ${{ matrix.os != 'macos-latest' }} | |
run: | | |
python -m pytest -v --cov=pyflyby --cov-report=xml\ | |
--doctest-modules\ | |
--maxfail=3\ | |
--json-report\ | |
--json-report-file=report-${ENVNAME}.json\ | |
lib tests | |
- uses: actions/upload-artifact@v3 | |
name: upload pytest timing reports as json | |
with: | |
path: | | |
./report-*.json | |
- uses: codecov/codecov-action@v4 | |
- name: Build docs | |
if: ${{ matrix.python-version == '3.11'}} | |
run: | | |
pip install sphinx sphinx_rtd_theme sphinx-autodoc-typehints | |
cd doc | |
make html | |
cd .. |