-
-
Notifications
You must be signed in to change notification settings - Fork 861
51 lines (42 loc) · 1.5 KB
/
lint.yml
File metadata and controls
51 lines (42 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Lint
on:
push:
branches:
- master
- develop
pull_request:
merge_group:
concurrency:
# Cancel previous runs of this workflow for the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Merge CI fixes from sagemath/sage
run: |
.github/workflows/merge-fixes.sh
env:
GH_TOKEN: ${{ github.token }}
- name: Install prerequisites
id: deps
run: pip install uv
- name: Code style check with ruff
if: ${{ !cancelled() && steps.deps.outcome == 'success' }}
run: |
uv run --frozen --only-group lint -- ruff check --output-format github --config .github/workflows/ruff.toml --no-preview
uv run --frozen --only-group lint -- ruff check --output-format github --config .github/workflows/ruff.toml --preview
- name: Code style check with relint
if: ${{ !cancelled() && steps.deps.outcome == 'success' }}
run: uv run --frozen --only-group lint -- relint -c src/.relint.yml -- src/sage/
- name: Validate docstring markup as RST
if: ${{ !cancelled() && steps.deps.outcome == 'success' }}
run: uv run --frozen --only-group lint -- flake8 --select=RST src/sage/ --config src/tox.ini
- name: TOML format check with taplo
uses: docker://tamasfe/taplo:0.10.0
with:
args: format --check --diff pyproject.toml .taplo.toml