Debian Codegraph @

.github/workflows/lint.yml

raw
1 name: Lint
2
3 on:
4 push:
5 pull_request:
6 workflow_dispatch:
7
8 permissions:
9 contents: read
10
11 concurrency:
12 group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13 cancel-in-progress: true
14
15 env:
16 FORCE_COLOR: "1"
17 UV_SYSTEM_PYTHON: "1" # make uv do global installs
18
19 jobs:
20 ruff:
21 runs-on: ubuntu-latest
22
23 steps:
24 - uses: actions/checkout@v4
25 with:
26 persist-credentials: false
27
28 - name: Install Ruff
29 uses: astral-sh/ruff-action@v3
30 with:
31 args: --version
32
33 - name: Lint with Ruff
34 run: ruff check --output-format=github
35
36 - name: Format with Ruff
37 run: ruff format --diff
38
39 twine:
40 runs-on: ubuntu-latest
41
42 steps:
43 - uses: actions/checkout@v4
44 with:
45 persist-credentials: false
46 - name: Set up Python
47 uses: actions/setup-python@v5
48 with:
49 python-version: "3"
50 - name: Install uv
51 uses: astral-sh/setup-uv@v5
52 with:
53 version: latest
54 enable-cache: false
55 - name: Install dependencies
56 run: uv pip install --group package
57 - name: Lint with twine
58 run: |
59 python -m build .
60 twine check dist/*