diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a65e6a82076a3c11193d9c92421ae43aeb3b3d2d..dbccea95691d36ff78c06679dd3ba9faafb0b050 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 ####