Skip to content

Commit c1f1706

Browse files
committed
ci: refactor: PYTEST_ARGS
1 parent fc507b2 commit c1f1706

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.gitlab-ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ test:
7676
- python -m pip install -U pip
7777
- python -m pip install -e .
7878
- python -m pip install pytest pytest-cov plotly
79-
script:
80-
- >
81-
if [ "$CI_COMMIT_BRANCH" == "master" ]; then
82-
pytest --cov=compressai -s tests
83-
else
84-
pytest --cov=compressai -m "not pretrained" -s tests
79+
- |
80+
PYTEST_ARGS=(--cov=compressai --capture=no tests)
81+
if [ "$CI_COMMIT_BRANCH" != "master" ]; then
82+
PYTEST_ARGS+=(-m "not pretrained")
8583
fi
84+
script:
85+
- pytest "${PYTEST_ARGS[@]}"
8686
parallel:
8787
matrix:
8888
- PYTORCH_IMAGE:

0 commit comments

Comments
 (0)