Skip to content

Commit a38151a

Browse files
committed
make workflow easier
1 parent 88e41f9 commit a38151a

File tree

2 files changed

+9
-63
lines changed

2 files changed

+9
-63
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
permissions:
88
contents: read
99
jobs:
10-
lint:
11-
name: Run linting
10+
test:
11+
name: Run tests
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
@@ -25,27 +25,21 @@ jobs:
2525
with:
2626
python-version-file: "pyproject.toml"
2727

28-
- name: run linting
29-
run: uvx --with=tox-uv tox -e linting
28+
- name: Run tests
29+
working-directory: webapp
30+
run: uv run python manage.py test --settings=vokou.settings.testing
3031

31-
test:
32-
name: Run tests
32+
lint:
33+
name: Run linting
3334
runs-on: ubuntu-latest
3435
steps:
3536
- name: Checkout
3637
uses: actions/checkout@v3
3738

38-
- name: Install the latest version of uv
39-
uses: astral-sh/setup-uv@v6
40-
with:
41-
version: "latest"
42-
enable-cache: false
43-
4439
- name: setup python
4540
uses: actions/setup-python@v5
4641
with:
4742
python-version-file: "pyproject.toml"
4843

49-
- name: run testing
50-
run: uvx --with=tox-uv tox -e testing
51-
44+
- name: flake8 Lint
45+
uses: py-actions/[email protected]

pyproject.toml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -38,57 +38,9 @@ packages = ["webapp"]
3838

3939
[dependency-groups]
4040
dev = [
41-
{ include-group = "test" },
42-
{ include-group = "lint" },
43-
]
44-
test = [
4541
"fake-factory==0.7.4",
4642
"factory-boy==3.2.1",
4743
"mock==1.0.1",
4844
"django-debug-toolbar==3.8.1",
4945
"debugpy==1.6.6",
5046
]
51-
lint = [
52-
"ruff>=0.8.4",
53-
]
54-
55-
[tool.pytest.ini_options]
56-
addopts = [
57-
"--durations=10",
58-
]
59-
60-
[tool.mypy]
61-
warn_unused_configs = true
62-
63-
[tool.ruff]
64-
line-length = 120
65-
66-
[tool.ruff.lint]
67-
select = ["ALL"]
68-
69-
[tool.ruff.lint.flake8-annotations]
70-
allow-star-arg-any = true
71-
72-
[tool.ruff.lint.pydocstyle]
73-
convention = "google"
74-
75-
# Tox configuration for testing with Django and linting with ruff
76-
[tool.tox]
77-
min_version = "4.22"
78-
requires = [
79-
"tox>=4.22",
80-
"tox-uv",
81-
]
82-
env_list = [
83-
"testing",
84-
"linting",
85-
]
86-
87-
[tool.tox.env.testing]
88-
dependency_groups = [ "test" ]
89-
change_dir = "webapp"
90-
commands = [ [ "python", "manage.py", "test", "--settings=vokou.settings.testing", { replace = "posargs", default = [], extend = true } ] ]
91-
92-
[tool.tox.env.linting]
93-
dependency_groups = [ "lint" ]
94-
commands = [ [ "ruff", "check", { replace = "posargs", default = [ "webapp" ], extend = true } ] ]

0 commit comments

Comments
 (0)