Commit 620e5a8f authored by David Diederich's avatar David Diederich
Browse files

Added test stage to run unit tests

parent de5e7da7
stages: stages:
- prepare - prepare
- build - build
- test
variables: variables:
SHA_IMAGE_TAG: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA SHA_IMAGE_TAG: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
...@@ -17,11 +18,14 @@ devel-container: ...@@ -17,11 +18,14 @@ devel-container:
- docker build -t $SHA_IMAGE_TAG -f build-environment.Dockerfile . - docker build -t $SHA_IMAGE_TAG -f build-environment.Dockerfile .
- docker push $SHA_IMAGE_TAG - docker push $SHA_IMAGE_TAG
# --------------------------------------------------------------------------------
compile: compile:
stage: build stage: build
image: $SHA_IMAGE_TAG image: $SHA_IMAGE_TAG
tags: ['docker-runner'] tags: ['docker-runner']
cache: artifacts:
expire_in: 1 hr
paths: paths:
- build - build
script: script:
...@@ -29,3 +33,13 @@ compile: ...@@ -29,3 +33,13 @@ compile:
- cd build - cd build
- cmake $CMAKE_OPTIONS .. - cmake $CMAKE_OPTIONS ..
- make -j8 - make -j8
# --------------------------------------------------------------------------------
unit-tests:
stage: test
image: $SHA_IMAGE_TAG
tags: ['docker-runner']
script:
- cd build
- make 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