Enable ruff #101
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
defaults: | |
run: | |
shell: bash -l {0} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
run: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 3 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v6 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install package with test dependencies | |
run: pip install .[test] | |
- name: Test installation with nbdime | |
if: ${{ matrix.python-version != '3.9' }} | |
run: pytest -v --nbdime | |
- name: Test installation without nbdime | |
if: ${{ matrix.python-version == '3.9' }} | |
run: pytest -v | |
- name: Test flake8 | |
run: flake8 matplotlib_inline --ignore=E501,W504,W503 | |
- name: Install ruff | |
run: mamba install ruff | |
- name: Check code with ruff | |
run: ruff check matplotlib_inline | |
- name: Check formatting with ruff | |
run: ruff format matplotlib_inline --check |