Skip to content

Commit 3dce700

Browse files
committed
adjust for uv
1 parent 9e3b870 commit 3dce700

File tree

1 file changed

+89
-38
lines changed

1 file changed

+89
-38
lines changed

.github/workflows/linting.yaml

Lines changed: 89 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,50 +13,101 @@ on:
1313
permissions:
1414
contents: read
1515

16+
strategy:
17+
matrix:
18+
python-version:
19+
- "3.8"
20+
- "3.9"
21+
- "3.10"
22+
- "3.11"
23+
- "3.12"
24+
1625
jobs:
26+
# see https://docs.astral.sh/uv/guides/integration/github/
1727
run-tests:
1828
name: Python linters
1929
runs-on: ubuntu-latest
20-
timeout-minutes: 5
2130

2231
steps:
23-
- uses: actions/checkout@v3
24-
with:
25-
persist-credentials: false
26-
fetch-depth: 0
27-
28-
- name: Set up Python 3.12
29-
uses: actions/setup-python@v4
30-
with:
31-
python-version: "3.12"
32-
33-
- name: Set up Poetry
34-
run: |
35-
pip install poetry==${{ env.POETRY_VERSION }}
36-
37-
- name: Install
38-
run: |
39-
just install
40-
41-
- name: Flake8
42-
run: |
43-
just flake8
44-
45-
- name: Ruff
46-
run: |
47-
just ruff-check
48-
49-
- name: Pylint
50-
run: |
51-
just pylint
52-
53-
- name: Mypy
54-
run: |
55-
just mypy
56-
57-
- name: Pyroma
58-
run: |
59-
just pyroma
32+
- uses: actions/checkout@v4
33+
34+
- name: Install uv
35+
uses: astral-sh/setup-uv@v4
36+
37+
# - name: Set up Python
38+
# run: uv python install
39+
40+
# - name: "Set up Python"
41+
# uses: actions/setup-python@v5
42+
# with:
43+
# python-version-file: ".python-version"
44+
45+
# - name: "Set up Python"
46+
# uses: actions/setup-python@v5
47+
# with:
48+
# python-version-file: "pyproject.toml"
49+
50+
- name: Set up Python ${{ matrix.python-version }}
51+
run: uv python install ${{ matrix.python-version }}
52+
53+
- name: Install the project
54+
run: uv sync --all-extras --dev
55+
56+
- name: Ruff check
57+
run: uv run ruff check .
58+
59+
- name: Flake8 check
60+
run: uv run flake8 .
61+
- name: Pylint
62+
run: uv run pylint
63+
64+
- name: Pyroma
65+
run: uv run pyroma
66+
67+
# jobs:
68+
# run-tests:
69+
# name: Python linters
70+
# runs-on: ubuntu-latest
71+
# timeout-minutes: 5
72+
73+
# steps:
74+
# - uses: actions/checkout@v3
75+
# with:
76+
# persist-credentials: false
77+
# fetch-depth: 0
78+
79+
# - name: Set up Python 3.12
80+
# uses: actions/setup-python@v4
81+
# with:
82+
# python-version: "3.12"
83+
84+
# - name: Set up Poetry
85+
# run: |
86+
# pip install poetry==${{ env.POETRY_VERSION }}
87+
88+
# - name: Install
89+
# run: |
90+
# just install
91+
92+
# - name: Flake8
93+
# run: |
94+
# just flake8
95+
96+
# - name: Ruff
97+
# run: |
98+
# just ruff-check
99+
100+
# - name: Pylint
101+
# run: |
102+
# just pylint
103+
104+
# - name: Mypy
105+
# run: |
106+
# just mypy
107+
108+
# - name: Pyroma
109+
# run: |
110+
# just pyroma
60111

61112
# - name: Check poetry
62113
# run: |

0 commit comments

Comments
 (0)