d1c054a383
Because one cannot simply disable stages in gitlab-ci.
48 lines
No EOL
861 B
YAML
48 lines
No EOL
861 B
YAML
image: node:16-alpine
|
|
|
|
variables: &global_variables
|
|
DOCKER_DRIVER: overlay2
|
|
DOCKER_HOST: unix:///var/run/docker.sock
|
|
|
|
cache: &global_cache_policy
|
|
key: '$CI_COMMIT_SHORT_SHA'
|
|
policy: pull-push
|
|
paths:
|
|
- node_modules/
|
|
- build
|
|
|
|
stages:
|
|
- build
|
|
- test
|
|
|
|
build:
|
|
stage: build
|
|
before_script: &before-build
|
|
- apk --no-cache add git python3 build-base
|
|
script:
|
|
- yarn
|
|
- yarn build:prod
|
|
artifacts: &release-artifacts
|
|
name: "admin-fe-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
|
|
paths:
|
|
- dist/
|
|
|
|
lint:
|
|
stage: test
|
|
before_script: &before-yarn
|
|
- apk --no-cache add git python3 build-base
|
|
- yarn
|
|
cache:
|
|
key: '$CI_COMMIT_SHORT_SHA'
|
|
policy: pull
|
|
script:
|
|
- yarn lint
|
|
|
|
test:
|
|
stage: test
|
|
before_script: *before-yarn
|
|
cache:
|
|
key: '$CI_COMMIT_SHORT_SHA'
|
|
policy: pull
|
|
script:
|
|
- yarn test |