Skip to content
Snippets Groups Projects
Commit c54c3ff4 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

add test to pipeline

parent 0c5f6baa
No related branches found
No related tags found
1 merge request!6Micronaut Service
......@@ -2,8 +2,11 @@ variables:
DOCKER_DIR: docker-images
DOCKER_TAR: ${DOCKER_DIR}/app.tar
IMAGE_NAME: ${CI_PROJECT_NAME}:${CI_COMMIT_REF_SLUG}
JACOCO_HTML_DIR: ${REPORTS_DIR}/jacoco/test/html
JUNIT_FILES: build/test-results/test/TEST-*.xml
NSHMP_LIB: nshmp-lib
NSHMP_LIB_GIT: https://gitlab-ci-token:${CI_JOB_TOKEN}@code.usgs.gov/ghsc/nshmp/${NSHMP_LIB}.git
REPORTS_DIR: build/reports
stages:
- test
......@@ -73,6 +76,33 @@ Spotbugs Main:
script:
- ./gradlew spotbugsMain;
####
# Run tests.
# Globals:
# (string) JACOCO_HTML_DIR - Directory of Jacoco html reports
# (string) JUNIT_FILES - Path to all Junit html files
# (string) CI_PROJECT_NAME - The name of the project
####
Unit Tests:
stage: test
image: gradle:jdk11
extends: .dev-tags
only:
- merge_request
- master@ghsc/nshmp/nshmp-netcdf
- tags@ghsc/nshmp/nshmp-netcdf
coverage: '/Total.*?([0-9]{1,3})%/'
before_script:
- *nshmp-lib
script:
- ./gradlew check;
- cat ${JACOCO_HTML_DIR}/index.html;
artifacts:
paths:
- ${REPORTS_DIR}
reports:
junit: ${JUNIT_FILES}
####
# Build Docker image.
# Globals:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment