Files
expert-front/.gitlab-ci.yml
AmirHossein Mahmoodi 46d6dc6bb6 LFFE-14 Testing config
2023-11-05 11:21:03 +03:30

81 lines
1.5 KiB
YAML

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