Skip to content

Setup pre commit with ruff #11

Setup pre commit with ruff

Setup pre commit with ruff #11

Workflow file for this run

name: Continuous Integration
on:
pull_request:
merge_group:
jobs:
lint-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
# Tracked via issue #77
# 3.6: Not available on ubuntu-22.04
# 3.7: Results in failures in `test_cli.py`
# 3.12: pkg_resources not supported
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache Python dependencies
uses: actions/cache@v4
id: pip-cache
with:
path: ~/.cache/pip
key: pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
restore-keys: |
pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
- name: Install python dependencies
if: steps.pip-cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Check code style
run: |
ruff check
ruff format --check
- name: Run test
run: pytest