Modernize code #6
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
# GH Actions script to test Pyzo. | |
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
lint-build: | |
name: Test linting | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U ruff | |
- name: Ruff lint | |
run: | | |
ruff check --output-format=github . | |
- name: Ruff format | |
run: | | |
ruff format --check . | |
doc-build: | |
name: Test docs | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U sphinx | |
- name: Build docs | |
run: | | |
cd docs | |
make html SPHINXOPTS="-W --keep-going" | |
test-builds: | |
name: Test ${{ matrix.os }} py${{ matrix.pyversion }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
pyversion: '3.13' | |
- os: macos-latest | |
pyversion: '3.13' | |
# | |
- os: ubuntu-latest | |
pyversion: '3.13' | |
- os: ubuntu-latest | |
pyversion: '3.12' | |
- os: ubuntu-latest | |
pyversion: '3.11' | |
- os: ubuntu-latest | |
pyversion: '3.10' | |
- os: ubuntu-latest | |
pyversion: '3.9' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.pyversion }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.pyversion }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U pytest pytest-cov | |
- name: Install in development mode | |
run: | | |
pip install -e . | |
- name: Test on repo | |
run: | | |
pytest -v tests |