chore: update pre-commit hooks #1648
This file contains hidden or 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: CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
FORCE_COLOR: 3 | |
concurrency: | |
group: ${ github.workflow }-${ github.ref } | |
cancel-in-progress: true | |
jobs: | |
pylint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: astral-sh/setup-uv@v6 | |
- name: Install nox | |
run: uv tool install nox | |
- name: PyLint | |
run: nox -s pylint -- --output-format=github | |
checks: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
- "3.13" | |
- "3.14" | |
name: Check Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
- name: Setup uv | |
uses: astral-sh/setup-uv@v6 | |
- name: Prepare venv | |
run: uv venv | |
- name: Install package | |
if: matrix.python-version == '3.14' | |
run: uv pip install -e. --group test | |
- name: Install package (dask) | |
if: matrix.python-version != '3.14' | |
run: uv pip install -e ".[dask]" --group test | |
- name: Test package | |
run: .venv/bin/python -m pytest | |
- name: Install plotting requirements too | |
run: uv pip install -e ".[plot]" | |
- name: Test plotting too | |
run: .venv/bin/python -m pytest --mpl | |
minimums: | |
name: Check minimums | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Setup uv | |
uses: astral-sh/setup-uv@v6 | |
- name: Install nox | |
run: uv tool install nox | |
- name: Run nox | |
run: nox -s minimums | |
pass: | |
if: always() | |
needs: [pylint, checks, minimums] | |
runs-on: ubuntu-latest | |
timeout-minutes: 2 | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |