Commit 9d2d1d4f authored by Chandan Singh's avatar Chandan Singh

.gitlab-ci.yml: Run tests using tox

Instead of invoking tests throung `setup.py`, use `tox` as a frontend in
the CI pipelines.
parent 6b0cb5f3
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment