Skip to content

Commit 2aaee0d

Browse files
committed
Add tox config. In GitHub workflows, use tox.
Ref#12
1 parent 4dd5259 commit 2aaee0d

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,13 @@ jobs:
2020
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
2121

2222
steps:
23-
- uses: actions/checkout@v4
24-
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v4
26-
with:
27-
python-version: ${{ matrix.python-version }}
28-
- name: Install dependencies
29-
run: |
30-
python -m pip install --upgrade pip
31-
python -m pip install .
32-
python -m pip install -r dev-requirements.txt
33-
pip install pytest-cov
34-
35-
- name: Lint with pyflakes
36-
run: |
37-
doit pyflakes
38-
- name: Test & cover with pytest
39-
run: |
40-
pytest
23+
- uses: actions/checkout@v4
24+
- name: Setup Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: ${{ matrix.python }}
28+
allow-prereleases: true
29+
- name: Install tox
30+
run: python -m pip install tox
31+
- name: Run
32+
run: tox

tox.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[testenv]
2+
description = perform primary checks (tests, style, types, coverage)
3+
deps =
4+
setenv =
5+
PYTHONWARNDEFAULTENCODING = 1
6+
commands =
7+
pytest {posargs}
8+
usedevelop = True
9+
extras =

0 commit comments

Comments
 (0)