Newer
Older
image: ${CI_REGISTRY}/devops/images/usgs/node:lts
# Do not run for merge requests
workflow:
rules:
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH
Audit:
allow_failure: true
needs: []
script:
- npm audit
Audit Angular:
allow_failure: true
needs: []
script:
- cd example
- npm audit
stage: build
Lint Angular:
needs:
- Init
script:
- cd example
- npm run lint
stage: build
####
# Stage: Test
####
Angular Unit Tests:
artifacts:
paths:
- example/coverage/example
reports:
junit: example/junit.xml
needs:
- Init
script:
- cd example
- npm run test
stage: test
script:
- |
cat <<-EO_CONFIG > .npmrc
@${CI_PROJECT_ROOT_NAMESPACE}:registry=https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/
//${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}
- npm --no-git-tag-version version "${CI_COMMIT_TAG}";