From afc92dc8a9fc9e30aa6db19172ba8df32e097438 Mon Sep 17 00:00:00 2001 From: Chandan Singh Date: Wed, 8 Jan 2020 00:36:38 +0000 Subject: .gitlab-ci.yml: Simplify test environment declaration 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. --- .gitlab-ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a5133a86a..6ab79e131 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}" - PLUGINS_TESTS_COMMAND: "tox -e py35-plugins,py36-plugins,py37-plugins -- ${PYTEST_ARGS}" + TOXENV: py35, py36, py37, py38, py35-plugins, py36-plugins, py37-plugins, py38-plugins 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 "${PLUGINS_TESTS_COMMAND}" after_script: except: @@ -99,8 +98,7 @@ 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}" - PLUGINS_TESTS_COMMAND: "tox -e py38-plugins-nocover -- ${PYTEST_ARGS}" + TOXENV: py38-nocover,py38-plugins-nocover # Test the master version of some external plugins tests-plugins-master: @@ -159,7 +157,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 && ${PLUGINS_TESTS_COMMAND}" tests-fedora-missing-deps: # Ensure that tests behave nicely while missing bwrap and ostree -- cgit v1.2.1