Skip to content

Commit

Permalink
[Feature] ✨ made tests run through tox
Browse files Browse the repository at this point in the history
  • Loading branch information
Mokhtar FANDOULI committed Aug 25, 2024
1 parent 0e1cecb commit 9b917d4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ on:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8' ]
steps:
- uses: actions/checkout@main
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- run: pip install -r requirements.txt
- run: coverage run --source=. -m pytest -v tests && coverage report -m
- run: flake8
- uses: actions/checkout@main
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
20 changes: 20 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[tox]
envlist = py38

[gh-actions]
python =
3.8: py38

[testenv]
description = "Test environment"
allowlist_externals =
sed
passenv =
HOME
deps =
-rrequirements.txt
pytest-cov
commands =
coverage run --source=. -m pytest -v tests
coverage report -m
flake8

0 comments on commit 9b917d4

Please sign in to comment.