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: stages:
- build - build
...@@ -8,38 +8,39 @@ variables: ...@@ -8,38 +8,39 @@ variables:
# recursive should work here, but gitlab-runner does not pull the latest remote # recursive should work here, but gitlab-runner does not pull the latest remote
# for submodules: https://gitlab.com/gitlab-org/gitlab-runner/issues/3011 # for submodules: https://gitlab.com/gitlab-org/gitlab-runner/issues/3011
GIT_SUBMODULE_STRATEGY: none GIT_SUBMODULE_STRATEGY: none
GIT_SUBMODULE_OPTS: "--remote --recursive --init --recommend-shallow"
MAVEN_CLI_OPTS: "--batch-mode" MAVEN_CLI_OPTS: "--batch-mode"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
MAVEN_BUILD_OPTS: "-Dbuild.tooling=true -Dbuild.af3=true -Dbuild.emf=true" MAVEN_BUILD_OPTS: "-Dbuild.tooling=true -Dbuild.af3=true -Dbuild.emf=true"
MAVEN_TEST_OPTS: "-Dbuild.tests=true" MAVEN_TEST_OPTS: "-Dbuild.tests=true"
MAVEN_BUILD_DIR: "-Duser.dir=/builds/$CI_PROJECT_PATH"
before_script:
cache: cache:
key: Default
paths: paths:
- .m2/repository/ - .m2/repository/
- target/
build: build:
stage: build stage: build
cache:
key: Default
before_script: before_script:
- git submodule update --remote --recursive --init - git submodule update $GIT_SUBMODULE_OPTS
script: script:
- mvn $MAVEN_CLI_OPTS $MAVEN_BUILD_OPTS verify - mvn $MAVEN_CLI_OPTS $MAVEN_BUILD_OPTS verify
artifacts: artifacts:
paths: paths:
- releng/org.fortiss.af3.update/target/repository/ - releng/org.fortiss.af3.update/target/repository/
- releng/org.fortiss.tooling.update/target/repository/ - releng/org.fortiss.tooling.update/target/repository/
- products/af3/org.fortiss.af3.phoenix.product/target/extraArtifacts/
test: test:
stage: test stage: test
cache:
key: Default
before_script: before_script:
- git submodule update --remote --recursive --init - git submodule update $GIT_SUBMODULE_OPTS
#- git submodule update --remote --recursive --init releng/org.fortiss.af3.target - xvfb.sh # Setup of a virtual display needed for bringing up eclipse
#- git submodule update --remote --recursive --init tests/af3
script: script:
- mvn $MAVEN_CLI_OPTS $MAVEN_TEST_OPTS -Duser.dir=/builds/$CI_PROJECT_PATH integration-test - mvn $MAVEN_CLI_OPTS $MAVEN_TEST_OPTS $MAVEN_BUILD_DIR integration-test
artifacts:
paths:
- tests/af3/org.fortiss.af3.phoenix.product.tests/target/work/data/.metadata/.log
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