Skip to content

Commit

Permalink
Simplify envvar merging
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed May 21, 2024
1 parent 9de0f35 commit a2f9cf5
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ defaults:

env:
# Note, that there's "turtle" as well, which is always excluded from running.
DEFAULT_PYTEST_SELECTION: "integration or usecase or slow or network"
DEFAULT_PYTEST_SELECTION_OP: "not " # so it would be "not (integration or usecase)"
DEFAULT_DATALAD_TESTS_SSH: "1"
DEFAULT_DATALAD_LOG_ENV: GIT_SSH_COMMAND
PYTEST_SELECTION: "integration or usecase or slow or network"
PYTEST_SELECTION_OP: "not " # so it would be "not (integration or usecase)"
DATALAD_TESTS_SSH: "1"
DATALAD_LOG_ENV: GIT_SSH_COMMAND
# How/which git-annex we install. conda's build would be the fastest,
# but it must not get ahead in PATH to not shadow travis' python
DEFAULT_ANNEX_INSTALL_SCENARIO: "miniconda=py37_23.1.0-1 --python-match minor --batch git-annex=8.20201007 -m conda"
_DL_ANNEX_INSTALL_SCENARIO: "miniconda=py37_23.1.0-1 --python-match minor --batch git-annex=8.20201007 -m conda"
BOTO_CONFIG: /tmp/nowhere
DATALAD_DATASETS_TOPURL: https://datasets-tests.datalad.org

Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
- name: Install git-annex
run: |
pip install datalad-installer
eval datalad-installer --sudo ok -E new.env ${_DL_ANNEX_INSTALL_SCENARIO:-$DEFAULT_ANNEX_INSTALL_SCENARIO}
eval datalad-installer --sudo ok -E new.env ${_DL_ANNEX_INSTALL_SCENARIO}
# Append new.env to ~/.bashrc instead of $GITHUB_OUTPUT because it
# can include `source` and `conda activate` commands that are invalid
# for the latter; this also necessitates using an interactive shell
Expand Down Expand Up @@ -176,11 +176,6 @@ jobs:

- name: Run tests
run: |
: "${PYTEST_SELECTION:=$DEFAULT_PYTEST_SELECTION}"
: "${PYTEST_SELECTION_OP:=$DEFAULT_PYTEST_SELECTION_OP}"
: "${DATALAD_TESTS_SSH:=$DEFAULT_DATALAD_TESTS_SSH}"
: "${DATALAD_LOG_ENV:=$DEFAULT_DATALAD_LOG_ENV}"
PYTEST_OPTS=( -v )
# If we requested to run only not slow (typically <10sec) tests, fail
# if a test takes 3x more than that - it needs to get @slow or
Expand Down

0 comments on commit a2f9cf5

Please sign in to comment.