From c053fc681215cc3a7e404e8af07b8a54d4abf3c9 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Tue, 30 Aug 2022 09:18:32 -0600 Subject: [PATCH] add unit test --- .gitlab-ci.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a65e6a8..dbccea9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,7 @@ stages: - init - node-image - build + - test - publish default: @@ -26,9 +27,12 @@ Init: artifacts: paths: - node_modules + - example/node_modules image: ${DEVOPS_REGISTRY}usgs/node:16 script: - npm ci + - cd example + - npm ci stage: init #### @@ -83,10 +87,18 @@ Build Angular: - Init script: - cd example - - npm ci - npm run build stage: build +Lint Angular: + image: ${DEVOPS_REGISTRY}usgs/node:16 + needs: + - Init + script: + - cd example + - npm run lint + stage: build + Lint Project: image: ${DEVOPS_REGISTRY}usgs/node:16 needs: @@ -95,6 +107,24 @@ Lint Project: - npm run lint stage: build +#### +# Stage: Test +#### + +Angular Unit Tests: + artifacts: + paths: + - example/coverage/example + reports: + junit: example/junit.xml + image: ${DEVOPS_REGISTRY}usgs/node:16 + needs: + - Init + script: + - cd example + - npm run test + stage: test + #### # Stage: Publish #### -- GitLab