Files
Frontend/.gitlab-ci.yml
AmirHossein Mahmoodi 45f4aa0c31 Update .gitlab-ci.yml file
2023-10-15 08:49:12 +00:00

102 lines
1.4 KiB
YAML

image: node:latest
stages:
- build
- test
- test:build
- deploy
merge:build:
stage: build
script:
- npm install
- cp example.env.local .env.local
- cp example.env.local .env.test
only:
- merge_requests
artifacts:
paths:
- node_modules
merge:test:jest:
stage: test
script:
- npm run test
only:
- merge_requests
artifacts:
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:
- npm install
- cp example.env.local .env.local
- cp example.env.local .env.test
only:
- develop
- main
artifacts:
paths:
- node_modules
test:jest:
stage: test
script:
- npm run test
only:
- develop
- main
artifacts:
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:
- echo "Run deploy project"
only:
- main