LFFE-14 Testing config

This commit is contained in:
AmirHossein Mahmoodi
2023-11-05 11:21:03 +03:30
parent e940b235e8
commit 46d6dc6bb6
12 changed files with 256 additions and 2 deletions

81
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,81 @@
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