Skip to content

Commit c03b706

Browse files
Mokhtar FANDOULIMokhFn
authored andcommitted
[Feature] ✨ added tox, updated actions
1 parent 0e1cecb commit c03b706

File tree

2 files changed

+34
-7
lines changed

2 files changed

+34
-7
lines changed

.github/workflows/pr-tests.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,18 @@ on:
55
jobs:
66
test:
77
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: [ '3.8' ]
811
steps:
9-
- uses: actions/checkout@main
10-
- uses: actions/setup-python@v2
11-
with:
12-
python-version: '3.8'
13-
- run: pip install -r requirements.txt
14-
- run: coverage run --source=. -m pytest -v tests && coverage report -m
15-
- run: flake8
12+
- uses: actions/checkout@main
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@main
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip setuptools wheel
20+
python -m pip install tox tox-gh-actions
21+
- name: Test with tox
22+
run: tox

tox.ini

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[tox]
2+
envlist = py38
3+
4+
[gh-actions]
5+
python =
6+
3.8: py38
7+
8+
[testenv]
9+
description = "Test environment"
10+
allowlist_externals =
11+
sed
12+
passenv =
13+
HOME
14+
deps =
15+
-rrequirements.txt
16+
pytest-cov
17+
commands =
18+
coverage run --source=. -m pytest -v tests
19+
coverage report -m
20+
flake8

0 commit comments

Comments
 (0)