Skip to content

Commit

Permalink
Run tests without tox
Browse files Browse the repository at this point in the history
  • Loading branch information
jairhenrique committed Dec 11, 2023
1 parent 796dc8d commit ffdedc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ jobs:

- name: Install project dependencies
run: |
pip3 install --upgrade pip
pip3 install codecov tox tox-gh-actions
pip install --upgrade pip
pip install codecov .
- name: Run online tests with tox
run: tox -- -m online
run: ./runtests.sh --cov=./vcr --cov-branch --cov-report=xml --cov-append -m online

- name: Run offline tests with tox with no access to the Internet
run: |
# We're using unshare to take Internet access
# away from tox so that we'll notice whenever some new test
# is missing @pytest.mark.online decoration in the future
unshare --map-root-user --net -- \
sh -c 'ip link set lo up; tox -- -m "not online"'
sh -c 'ip link set lo up; ./runtests.sh --cov=./vcr --cov-branch --cov-report=xml --cov-append -m "not online"'
- name: Run coverage
run: codecov
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def run_tests(self):
"pytest",
"pytest-aiohttp",
"pytest-httpbin",
"requests>=2.16.2",
"requests>=2.22.0",
"tornado",
# Needed to un-break httpbin 0.7.0. For httpbin >=0.7.1 and after,
# this pin and the dependency itself can be removed, provided
Expand Down

0 comments on commit ffdedc3

Please sign in to comment.