Files
expert-front/.gitlab-ci.yml
Amirhossein Mahmoodi 987ac1d316 fixed bug
2024-11-05 10:20:26 +03:30

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