Skip to content

Linting workflow and pre-commit #14

Linting workflow and pre-commit

Linting workflow and pre-commit #14

Workflow file for this run

name: linting
on:
push:
branches: [master, linting-workflow, test-linting-workflow]
pull_request:
branches: [master, linting-workflow]
workflow_dispatch:
# TODO: setup linting with uv/ruff
# informed by testing.yml and https://medium.com/@sidharthvijayakumar7/automating-pylint-in-github-workflow-80c84b2ff243 and ruff documentation
jobs:
linting:
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.11", "3.12", "3.13"]
fail-fast: false
name: mp-cite (${{ matrix.os }}/py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install uv and set up the python version
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
version: "latest"
- name: Install ruff
run: uv add ruff
- name: Analyzing the code with ruff
run: |
uvx ruff check --output-format=github --verbose