summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2018-12-28 23:45:33 +0000
committerChandan Singh <csingh43@bloomberg.net>2019-01-03 03:31:52 +0000
commit9d2d1d4ff6ce7a248e4ea8427c9f6dfcabcefb78 (patch)
treee6c2d42109f3633e9309c49dfc563c64ebc995b8
parent6b0cb5f3566bd9f73baa90f809ac22b699285bbf (diff)
downloadbuildstream-9d2d1d4ff6ce7a248e4ea8427c9f6dfcabcefb78.tar.gz
.gitlab-ci.yml: Run tests using tox
Instead of invoking tests throung `setup.py`, use `tox` as a frontend in the CI pipelines.
-rw-r--r--.gitlab-ci.yml23
1 files changed, 10 insertions, 13 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cbe6666ed..50bddd76c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: buildstream/testsuite-debian:9-06bab030-b848172c
+image: buildstream/testsuite-debian:9-5da27168-32c47d1c
cache:
key: "$CI_JOB_NAME-"
@@ -13,7 +13,7 @@ stages:
variables:
PYTEST_ADDOPTS: "--color=yes"
INTEGRATION_CACHE: "${CI_PROJECT_DIR}/cache/integration-cache"
- TEST_COMMAND: 'python3 setup.py test --index-url invalid://uri --addopts --integration'
+ TEST_COMMAND: "tox -- --color=yes --integration"
#####################################################
# Prepare stage #
@@ -68,10 +68,6 @@ source_dist:
- mount
- df -h
- # Unpack
- - cd dist && ./unpack.sh
- - cd buildstream
-
script:
- useradd -Um buildstream
- chown -R buildstream:buildstream .
@@ -83,7 +79,7 @@ source_dist:
after_script:
# Collect our reports
- mkdir -p ${COVERAGE_DIR}
- - cp dist/buildstream/.coverage ${COVERAGE_DIR}/coverage."${CI_JOB_NAME}"
+ - cp .coverage ${COVERAGE_DIR}/coverage."${CI_JOB_NAME}"
except:
- schedules
artifacts:
@@ -91,19 +87,19 @@ source_dist:
- ${COVERAGE_DIR}
tests-debian-9:
- image: buildstream/testsuite-debian:9-06bab030-b848172c
+ image: buildstream/testsuite-debian:9-5da27168-32c47d1c
<<: *tests
tests-fedora-27:
- image: buildstream/testsuite-fedora:27-06bab030-b848172c
+ image: buildstream/testsuite-fedora:27-5da27168-32c47d1c
<<: *tests
tests-fedora-28:
- image: buildstream/testsuite-fedora:28-06bab030-b848172c
+ image: buildstream/testsuite-fedora:28-5da27168-32c47d1c
<<: *tests
tests-ubuntu-18.04:
- image: buildstream/testsuite-ubuntu:18.04-06bab030-b848172c
+ image: buildstream/testsuite-ubuntu:18.04-5da27168-32c47d1c
<<: *tests
overnight-fedora-28-aarch64:
@@ -120,7 +116,7 @@ overnight-fedora-28-aarch64:
tests-unix:
# Use fedora here, to a) run a test on fedora and b) ensure that we
# can get rid of ostree - this is not possible with debian-8
- image: buildstream/testsuite-fedora:27-06bab030-b848172c
+ image: buildstream/testsuite-fedora:27-5da27168-32c47d1c
<<: *tests
variables:
BST_FORCE_BACKEND: "unix"
@@ -140,7 +136,7 @@ tests-unix:
tests-fedora-missing-deps:
# Ensure that tests behave nicely while missing bwrap and ostree
- image: buildstream/testsuite-fedora:28-06bab030-b848172c
+ image: buildstream/testsuite-fedora:28-5da27168-32c47d1c
<<: *tests
script:
@@ -275,6 +271,7 @@ coverage:
coverage: '/TOTAL +\d+ +\d+ +(\d+\.\d+)%/'
script:
- cd dist && ./unpack.sh && cd buildstream
+ - pip3 install -r tools/requirements.txt -r tools/dev-requirements.txt
- pip3 install --no-index .
- mkdir report
- cd report