-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
45 lines (40 loc) · 1.44 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:latest
# This folder is cached between builds
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
cache:
paths:
- node_modules/
stages: # List of stages for jobs, and their order of execution
- build
- test
build-job: # This job runs in the build stage, which runs first.
stage: build
script:
- echo "creating .env file..."
- cat $DEV_ENV_FILE > .env
- echo "Installing dependencies..."
- yarn install
- echo "Dependencies installed."
- echo "Building the code..."
- yarn build
- echo "Build complete."
ui-test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully.
image: mcr.microsoft.com/playwright:v1.40.0-jammy
script:
- cat $DEV_ENV_FILE > .env
- yarn playwright install
- yarn pw:test
artifacts:
paths: #assuming deafult playwright artifacts paths
- ./playwright-report/
- ./Screenshot/
when: always
expire_in: 4 days #artifacts will purged after 4 days of test run
variables:
SOURCE_BRANCH: "main" # Branch in the source repository
TARGET_BRANCH: "main" # Branch in the downstream repository
DOWNSTREAM_PROJECT_IDS: "43484495,23077745,23077517" # aau, tu, wu project ids
SOURCE_PROJECT_ID: 14108617 # ID of indrz/indrz-frontend repo the source repository