Skip to content

Commit 25939ce

Browse files
lint action with fixed tox
1 parent 24d9acf commit 25939ce

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

.github/workflows/lint.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
poetry:
14+
name: Poetry Lockfile Check
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Install poetry
19+
run: pipx install poetry
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.12'
23+
cache: poetry
24+
- name: Check pyproject.toml and poetry.lock
25+
run: poetry check
26+
27+
lint:
28+
name: Lint Code
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: actions/setup-python@v5
33+
with:
34+
python-version: '3.12'
35+
cache: pip
36+
- name: Install tox
37+
run: python -m pip install tox
38+
- name: Run code quality checks
39+
run: tox -e lint

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[tox]
22
envlist = py39, py310, py311, py312, py313
33

4-
[testenv]
4+
[testenv:py]
55
skip_install = true
66
allowlist_externals = poetry
77
commands_pre =
88
poetry install
99
commands =
1010
poetry run pytest
1111

12-
[lint]
12+
[testenv:lint]
1313
skip_install = true
1414
deps =
1515
ruff
@@ -20,7 +20,7 @@ commands =
2020
black --check --diff .
2121
codespell
2222

23-
[format]
23+
[testenv:format]
2424
skip_install = true
2525
deps =
2626
ruff

0 commit comments

Comments
 (0)