Commit 3ab4f95b authored by Alexander Diewald's avatar Alexander Diewald

CI: Fixup the test stage

* Use a custom docker image that has the required libraries installed.
  It is based on the official maven image.
* Fixup caching (define the key).
* Start Xvfb before launching the tests. Required to get a fake display
  that allows starting up the eclipse application.
Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parent 27001220
image: maven:latest
image: maven_eclipse:latest
stages:
- build
......@@ -8,38 +8,39 @@ variables:
# recursive should work here, but gitlab-runner does not pull the latest remote
# for submodules: https://gitlab.com/gitlab-org/gitlab-runner/issues/3011
GIT_SUBMODULE_STRATEGY: none
GIT_SUBMODULE_OPTS: "--remote --recursive --init --recommend-shallow"
MAVEN_CLI_OPTS: "--batch-mode"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
MAVEN_BUILD_OPTS: "-Dbuild.tooling=true -Dbuild.af3=true -Dbuild.emf=true"
MAVEN_TEST_OPTS: "-Dbuild.tests=true"
MAVEN_BUILD_DIR: "-Duser.dir=/builds/$CI_PROJECT_PATH"
before_script:
cache:
key: Default
paths:
- .m2/repository/
- target/
build:
stage: build
cache:
key: Default
before_script:
- git submodule update --remote --recursive --init
- git submodule update $GIT_SUBMODULE_OPTS
script:
- mvn $MAVEN_CLI_OPTS $MAVEN_BUILD_OPTS verify
artifacts:
paths:
- releng/org.fortiss.af3.update/target/repository/
- releng/org.fortiss.tooling.update/target/repository/
- products/af3/org.fortiss.af3.phoenix.product/target/extraArtifacts/
test:
stage: test
cache:
key: Default
before_script:
- git submodule update --remote --recursive --init
#- git submodule update --remote --recursive --init releng/org.fortiss.af3.target
#- git submodule update --remote --recursive --init tests/af3
- git submodule update $GIT_SUBMODULE_OPTS
- xvfb.sh # Setup of a virtual display needed for bringing up eclipse
script:
- mvn $MAVEN_CLI_OPTS $MAVEN_TEST_OPTS -Duser.dir=/builds/$CI_PROJECT_PATH integration-test
artifacts:
paths:
- tests/af3/org.fortiss.af3.phoenix.product.tests/target/work/data/.metadata/.log
- mvn $MAVEN_CLI_OPTS $MAVEN_TEST_OPTS $MAVEN_BUILD_DIR integration-test
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