Skip to content

Commit 58b5fc7

Browse files
lint action with fixed tox
1 parent aa33028 commit 58b5fc7

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
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: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
[tox]
2-
envlist = py39, py310, py311, py312, py313
2+
envlist =
3+
lint
4+
py{39,310,311,312,313}
35
isolated_build = true
46

5-
[testenv]
7+
[testenv:py]
68
deps=
79
pytest
810
requests-cache
911
coverage
1012
commands=
1113
python -m pytest
1214

13-
[lint]
15+
[testenv:lint]
1416
skip_install = true
1517
deps =
1618
ruff
@@ -21,7 +23,7 @@ commands =
2123
black --check --diff .
2224
codespell
2325

24-
[format]
26+
[testenv:format]
2527
skip_install = true
2628
deps =
2729
ruff

0 commit comments

Comments
 (0)