Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add proper configuration for tox/tests #222

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest parameterized
if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi
python -m pip install -r requirements.txt -r test-requirements.txt
python -m pip install flake8
- name: Lint with flake8
run: |
# See https://www.flake8rules.com for the list of the rules.
Expand Down Expand Up @@ -74,10 +74,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest parameterized
python -m pip install -r requirements.txt -r test-requirements.txt
# note: the following also installs "coverage"
python -m pip install coveralls
if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi
- name: Get coverage report
run: |
coverage run --source=${package_name} --append -m pytest
Expand Down
3 changes: 3 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# in alphabetical order:
parameterized
pytest
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@ extend-ignore = E124,E126,E127,E128,E501
max-line-length = 127

max-complexity = 10

[testenv]
# Configuration for tox - see https://tox.wiki/en/latest/config.html.
deps =
-r requirements.txt
-r test-requirements.txt
commands =
python -m pytest {posargs}
Loading