Skip to content

Commit cc29965

Browse files
committed
test: Use tox pipeline instead of pytest
1 parent 508d290 commit cc29965

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,10 @@ jobs:
4545
run: filetype --help
4646

4747
- name: Install test framework dependencies
48-
run: python -m pip install pytest pytest-random-order pytest-cov pytest-html
49-
50-
- name: UnitTest with pytest and coverage
51-
run: |
52-
pytest \
53-
--random-order \
54-
--random-order-bucket=global \
55-
--ignore=examples \
56-
--ignore=tests/test_benchmark.py \
57-
--cov=filetype \
58-
--cov-report html:coverage/ \
59-
tests \
60-
;
48+
run: python -m pip install tox
49+
50+
- name: Run tox pipeline
51+
run: tox
6152

6253
- name: HTML coverage reports
6354
if: always()

tox.ini

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,23 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py{27,35,36,37,38,39}, lint, doc, clean
7+
envlist = py{27,35,36,37,38,39}, lint, test, doc, clean
88
skip_missing_interpreters = true
99

1010
[testenv:test]
11-
deps = pytest
12-
commands = pytest --ignore=tests/test_benchmark.py
11+
deps =
12+
pytest
13+
pytest-random-order
14+
pytest-cov
15+
pytest-html
16+
commands = pytest \
17+
--random-order \
18+
--random-order-bucket=global \
19+
--ignore=examples \
20+
--ignore=tests/test_benchmark.py \
21+
--cov=filetype \
22+
--cov-report html:coverage/ \
23+
tests
1324

1425
[testenv:lint]
1526
basepython = python3

0 commit comments

Comments
 (0)