Fixed bug gitlab-ci
This commit is contained in:
@@ -1,114 +1,76 @@
|
||||
image: node:latest
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- node_modules
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- test:build
|
||||
- deploy
|
||||
|
||||
merge:build:
|
||||
stage: build
|
||||
merge:test:jest:
|
||||
stage: test
|
||||
script:
|
||||
- npm install
|
||||
- cp example.env.local .env.local
|
||||
- cp example.env.local .env.test
|
||||
only:
|
||||
- merge_requests
|
||||
artifacts:
|
||||
paths:
|
||||
- node_modules
|
||||
- .env.local
|
||||
- .env.test
|
||||
|
||||
merge:test:jest:
|
||||
stage: test
|
||||
script:
|
||||
- npm run test
|
||||
only:
|
||||
- merge_requests
|
||||
artifacts:
|
||||
paths:
|
||||
- node_modules
|
||||
- .env.local
|
||||
- .env.test
|
||||
|
||||
merge:test:lint:
|
||||
stage: test
|
||||
script:
|
||||
- npm install
|
||||
- cp example.env.local .env.local
|
||||
- cp example.env.local .env.test
|
||||
- npm run lint
|
||||
only:
|
||||
- merge_requests
|
||||
artifacts:
|
||||
paths:
|
||||
- node_modules
|
||||
- .env.local
|
||||
- .env.test
|
||||
|
||||
#merge:test:build:
|
||||
# stage: test:build
|
||||
# script:
|
||||
# - npm install
|
||||
# - cp example.env.local .env.local
|
||||
# - cp example.env.local .env.test
|
||||
# - npm run build
|
||||
# only:
|
||||
# - merge_requests
|
||||
# artifacts:
|
||||
# paths:
|
||||
# - node_modules
|
||||
# - .env.local
|
||||
# - .env.test
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- npm install
|
||||
- cp example.env.local .env.local
|
||||
- cp example.env.local .env.test
|
||||
only:
|
||||
- develop
|
||||
- main
|
||||
artifacts:
|
||||
paths:
|
||||
- node_modules
|
||||
- .env.local
|
||||
- .env.test
|
||||
|
||||
test:jest:
|
||||
stage: test
|
||||
script:
|
||||
- npm install
|
||||
- cp example.env.local .env.local
|
||||
- cp example.env.local .env.test
|
||||
- npm run test
|
||||
only:
|
||||
- develop
|
||||
- main
|
||||
artifacts:
|
||||
paths:
|
||||
- node_modules
|
||||
- .env.local
|
||||
- .env.test
|
||||
|
||||
test:lint:
|
||||
stage: test
|
||||
script:
|
||||
- npm install
|
||||
- cp example.env.local .env.local
|
||||
- cp example.env.local .env.test
|
||||
- npm run lint
|
||||
only:
|
||||
- develop
|
||||
- main
|
||||
artifacts:
|
||||
paths:
|
||||
- node_modules
|
||||
- .env.local
|
||||
- .env.test
|
||||
|
||||
#test:build:
|
||||
# stage: test:build
|
||||
# script:
|
||||
# - npm install
|
||||
# - cp example.env.local .env.local
|
||||
# - cp example.env.local .env.test
|
||||
# - npm run build
|
||||
# only:
|
||||
# - develop
|
||||
# - main
|
||||
# artifacts:
|
||||
# paths:
|
||||
# - node_modules
|
||||
# - .env.local
|
||||
# - .env.test
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
|
||||
Reference in New Issue
Block a user