Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 17 additions & 41 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,31 @@ name: Lint

on: [push, pull_request, workflow_dispatch]

permissions: {}

env:
FORCE_COLOR: 1

permissions:
contents: read
PREK_COLOR: always
RUFF_OUTPUT_FORMAT: github

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:

lint:
runs-on: ubuntu-latest

name: Lint

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- name: pre-commit cache
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: lint-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
restore-keys: |
lint-pre-commit-

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
cache: pip
cache-dependency-path: "setup.py"

- name: Build system information
run: python3 .github/workflows/system-info.py

- name: Install dependencies
run: |
python3 -m pip install -U pip
python3 -m pip install -U tox

- name: Lint
run: tox -e lint
env:
PRE_COMMIT_COLOR: always

- name: Mypy
run: tox -e mypy
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Lint
run: uvx --with tox-uv tox -e lint
- name: Mypy
run: uvx --with tox-uv tox -e mypy
1 change: 0 additions & 1 deletion .github/zizmor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Configuration for the zizmor static analysis tool, run via pre-commit in CI
# https://docs.zizmor.sh/configuration/
rules:
obfuscation:
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ requires =
tox>=4.2
env_list =
lint
mypy
py{py3, 315, 314, 313, 312, 311, 310}

[testenv]
Expand All @@ -18,11 +19,11 @@ commands =
skip_install = true
deps =
check-manifest
pre-commit
prek
pass_env =
PRE_COMMIT_COLOR
PREK_COLOR
commands =
pre-commit run --all-files --show-diff-on-failure
prek run --all-files --show-diff-on-failure
check-manifest

[testenv:mypy]
Expand Down
Loading