Skip to content

Commit c194d86

Browse files
committed
Adding online option to tox and the usage of pytest-rerunfailures for CI [skip ci]
1 parent be0938f commit c194d86

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/ci_crontests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
- name: Python 3.9 with all dependencies with remote data
2525
os: ubuntu-latest
2626
python: '3.9'
27-
toxenv: py39-test-alldeps-devdeps
27+
toxenv: py39-test-alldeps-devdeps-online
2828
toxargs: -v
29-
toxposargs: --remote-data -v --durations=50
29+
toxposargs: -v --durations=50
3030

3131
- name: pre-repease dependencies with all dependencies
3232
os: ubuntu-latest

tox.ini

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{37,38,39,310}-test{,-alldeps,-oldestdeps,-devdeps,-predeps}{,-cov}
3+
py{37,38,39,310}-test{,-alldeps,-oldestdeps,-devdeps,-predeps}{,-online}{,-cov}
44
codestyle
55
build_docs
66
requires =
@@ -26,6 +26,10 @@ changedir = .tmp/{envname}
2626

2727
description = run tests
2828

29+
setenv =
30+
PYTEST_ARGS = ''
31+
online: PYTEST_ARGS = --remote-data=any --reruns=1 --reruns-delay 10
32+
2933
deps =
3034
devdeps: git+https://github.com/astropy/astropy.git#egg=astropy
3135
devdeps: git+https://github.com/astropy/pyvo.git#egg=pyvo
@@ -38,6 +42,7 @@ deps =
3842
oldestdeps: matplotlib==3.3.*
3943
oldestdeps: pyvo==1.1
4044
cov: codecov
45+
online: pytest-rerunfailures
4146

4247
extras =
4348
test
@@ -47,8 +52,8 @@ extras =
4752
commands =
4853
pip freeze
4954
# FIXME: there are too many failures in the docs example gallery, ignore it for now
50-
!cov: pytest --pyargs astroquery {toxinidir}/docs --ignore={toxinidir}/docs/gallery* {posargs}
51-
cov: pytest --pyargs astroquery {toxinidir}/docs --ignore={toxinidir}/docs/gallery* --cov astroquery --cov-config={toxinidir}/setup.cfg {posargs}
55+
!cov: pytest --pyargs astroquery {toxinidir}/docs --ignore={toxinidir}/docs/gallery* {env:PYTEST_ARGS} {posargs}
56+
cov: pytest --pyargs astroquery {toxinidir}/docs --ignore={toxinidir}/docs/gallery* --cov astroquery --cov-config={toxinidir}/setup.cfg {env:PYTEST_ARGS} {posargs}
5257
cov: coverage xml -o {toxinidir}/coverage.xml
5358

5459
pip_pre =

0 commit comments

Comments
 (0)