mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Merge pull request #718 from kevin1024/enforce-online-marker-completeness
Make CI enforce that all online tests are marked with @pytest.mark.online
This commit is contained in:
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
@@ -31,5 +31,13 @@ jobs:
|
|||||||
- name: Run tests with tox
|
- name: Run tests with tox
|
||||||
run: tox
|
run: tox
|
||||||
|
|
||||||
|
- 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"'
|
||||||
|
|
||||||
- name: Run coverage
|
- name: Run coverage
|
||||||
run: codecov
|
run: codecov
|
||||||
|
|||||||
@@ -4,4 +4,4 @@
|
|||||||
# If you are getting an INVOCATION ERROR for this script then there is
|
# If you are getting an INVOCATION ERROR for this script then there is
|
||||||
# a good chance you are running on Windows.
|
# a good chance you are running on Windows.
|
||||||
# You can and should use WSL for running tox on Windows when it calls bash scripts.
|
# You can and should use WSL for running tox on Windows when it calls bash scripts.
|
||||||
REQUESTS_CA_BUNDLE=`python -m pytest_httpbin.certs` pytest $*
|
REQUESTS_CA_BUNDLE=`python -m pytest_httpbin.certs` exec pytest "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user