Update .gitlab-ci.yml file

This commit is contained in:
AmirHossein Mahmoodi
2023-10-15 08:35:59 +00:00
parent 2a2be7615c
commit 99782ad72d

View File

@@ -3,24 +3,22 @@ image: node:latest
stages:
- build
- test
- test:build
- deploy
merge:build:
stage: build
script:
- echo "Run build project"
- npm install
- npm run build
only:
- merge_requests
artifacts:
paths:
- node_modules
merge:test:
merge:test:jest:
stage: test
script:
- echo "Run test project"
- npm run test
only:
- merge_requests
@@ -28,12 +26,30 @@ merge:test:
paths:
- node_modules
merge:test:lint:
stage: test
script:
- npm run lint
only:
- merge_requests
artifacts:
paths:
- node_modules
merge:test:build:
stage: test:build
script:
- npm run build
only:
- merge_requests
artifacts:
paths:
- node_modules
build:
stage: build
script:
- echo "Run build project"
- npm install
- npm run build
only:
- develop
- main
@@ -41,10 +57,9 @@ build:
paths:
- node_modules
test:
test:jest:
stage: test
script:
- echo "Run test project"
- npm run test
only:
- develop
@@ -53,6 +68,28 @@ test:
paths:
- node_modules
test:lint:
stage: test
script:
- npm run lint
only:
- develop
- main
artifacts:
paths:
- node_modules
test:build:
stage: test:build
script:
- npm run build
only:
- develop
- main
artifacts:
paths:
- node_modules
deploy:
stage: deploy
script: