diff options
author | Chandan Singh <chandan@chandansingh.net> | 2020-01-08 00:36:38 +0000 |
---|---|---|
committer | Chandan Singh <chandan@chandansingh.net> | 2020-01-08 00:40:00 +0000 |
commit | 940dff20250f2ae6884b5756ffc6896365864644 (patch) | |
tree | decd6a88ea83c62cb7ea20d034e1dd5f9a957754 | |
parent | 51263e21ccdc80b72e7fc0edf614922616a8ac29 (diff) | |
download | buildstream-chandan/gitlab-ci-toxenvs.tar.gz |
.gitlab-ci.yml: Simplify test environment declarationchandan/gitlab-ci-toxenvs
Defining `EXTERNAL_TESTS_COMMAND` as an extra command makes it easy to
miss it, especially when adding new environments (as I was recently
bitten by it). Instead of that, we can control the environments using
`TOXENV` variable.
-rw-r--r-- | .gitlab-ci.yml | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 002146f9b..6f3e4f4b4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ variables: INTEGRATION_CACHE: "${CI_PROJECT_DIR}/cache/integration-cache" PYTEST_ARGS: "--color=yes --integration -n 2" TEST_COMMAND: "tox -- ${PYTEST_ARGS}" - EXTERNAL_TESTS_COMMAND: "tox -e py35-external,py36-external,py37-external,py38-external -- ${PYTEST_ARGS}" + TOXENV: py35, py36, py37, py38, py35-external, py36-external, py37-external, py38-external COVERAGE_PREFIX: "${CI_JOB_NAME}." @@ -55,7 +55,6 @@ variables: # Run the tests as a simple user to test for permission issues - su buildstream -c "${TEST_COMMAND}" - - su buildstream -c "${EXTERNAL_TESTS_COMMAND}" after_script: except: @@ -95,13 +94,12 @@ tests-python-3.8-buster: # Our testsuite has issues with coverage on Python 3.8 so disable coverage # in the meantime. For more details, see # https://gitlab.com/BuildStream/buildstream/issues/1173. - TEST_COMMAND: "tox -e py38-nocover -- ${PYTEST_ARGS}" - + # # This particular testsuite image has both Python 3.7 and Python 3.8 so we # need to explicitly force the 3.8 environment. # Once Python 3.8 is available in distros, we should switch to such an # image, and remove the following override. - EXTERNAL_TESTS_COMMAND: "tox -e py38-external -- ${PYTEST_ARGS}" + TOXENV: py38-nocover,py38-external-nocvoer overnight-fedora-30-aarch64: image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:aarch64-30-${DOCKER_IMAGE_VERSION} @@ -152,7 +150,6 @@ tests-userchroot: # Run the tests as a simple user to test for permission issues - su buildstream -c "umask 002 && ${TEST_COMMAND}" - - su buildstream -c "umask 002 && ${EXTERNAL_TESTS_COMMAND}" tests-fedora-missing-deps: # Ensure that tests behave nicely while missing bwrap and ostree |