From 9c10d5b249c8ddf768bb14935af82d91b3652151 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Sun, 15 Oct 2023 07:57:37 +0000 Subject: [PATCH 1/5] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 59 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 61ebb05..cd22071 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,26 +1,47 @@ image: node:latest stages: - - build - - test + - build + - test + +merge:build: + stage: build + script: + - echo "Run build project" + - npm install + - npm run build + only: + - merge_requests + artifacts: + paths: + - node_modules + +merge:test: + stage: test + script: + - echo "Run test project" + - npm run test + only: + - merge_requests + artifacts: + paths: + - node_modules build: - stage: build - script: - - npm install - - npm run build - only: - - merge_requests - artifacts: - paths: - - node_modules + stage: build + script: + - echo "Run build project" + - npm install + - npm run build + artifacts: + paths: + - node_modules test: - stage: test - script: - - npm run test - only: - - merge_requests - artifacts: - paths: - - node_modules \ No newline at end of file + stage: test + script: + - echo "Run test project" + - npm run test + artifacts: + paths: + - node_modules \ No newline at end of file From 2a2be7615c166df50766bfe6b35427c9946108e4 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Sun, 15 Oct 2023 08:12:14 +0000 Subject: [PATCH 2/5] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd22071..4d5868d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ image: node:latest stages: - build - test + - deploy merge:build: stage: build @@ -33,6 +34,9 @@ build: - echo "Run build project" - npm install - npm run build + only: + - develop + - main artifacts: paths: - node_modules @@ -42,6 +46,16 @@ test: script: - echo "Run test project" - npm run test + only: + - develop + - main artifacts: paths: - - node_modules \ No newline at end of file + - node_modules + +deploy: + stage: deploy + script: + - echo "Run deploy project" + only: + - main \ No newline at end of file From 99782ad72dff8c2c58ec42888ec9f18623446eba Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Sun, 15 Oct 2023 08:35:59 +0000 Subject: [PATCH 3/5] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d5868d..29b710d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: From 45f4aa0c3152c1c66297075c2d196e9209a4c813 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Sun, 15 Oct 2023 08:49:12 +0000 Subject: [PATCH 4/5] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 29b710d..d06637a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,8 @@ merge:build: stage: build script: - npm install + - cp example.env.local .env.local + - cp example.env.local .env.test only: - merge_requests artifacts: @@ -50,6 +52,8 @@ build: stage: build script: - npm install + - cp example.env.local .env.local + - cp example.env.local .env.test only: - develop - main From f0a2a9383fd000c29383e92a1e8aebf8c4c1ffd6 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Sun, 15 Oct 2023 08:54:37 +0000 Subject: [PATCH 5/5] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d06637a..d06af2b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,6 +17,8 @@ merge:build: artifacts: paths: - node_modules + - .env.local + - .env.test merge:test:jest: stage: test @@ -27,6 +29,8 @@ merge:test:jest: artifacts: paths: - node_modules + - .env.local + - .env.test merge:test:lint: stage: test @@ -37,6 +41,8 @@ merge:test:lint: artifacts: paths: - node_modules + - .env.local + - .env.test merge:test:build: stage: test:build @@ -47,6 +53,8 @@ merge:test:build: artifacts: paths: - node_modules + - .env.local + - .env.test build: stage: build @@ -60,6 +68,8 @@ build: artifacts: paths: - node_modules + - .env.local + - .env.test test:jest: stage: test @@ -71,6 +81,8 @@ test:jest: artifacts: paths: - node_modules + - .env.local + - .env.test test:lint: stage: test @@ -82,6 +94,8 @@ test:lint: artifacts: paths: - node_modules + - .env.local + - .env.test test:build: stage: test:build @@ -93,6 +107,8 @@ test:build: artifacts: paths: - node_modules + - .env.local + - .env.test deploy: stage: deploy