forked from BearStudio/start-ui-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
34 lines (30 loc) Β· 823 Bytes
/
.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
image: node:lts
cache:
paths:
- node_modules
- .yarn
stages:
- build
- test
build:
stage: build
script:
- echo "Installing dependencies"
- yarn install
- echo "Building application version"
- sed -i "s/__DEVELOPMENT__/$CI_PIPELINE_ID ($(date +"%Y-%m-%d"))/g" app-build.json
- sed -i "s/__VERSION__/PIPELINE $CI_PIPELINE_ID - JOB $CI_JOB_ID/g" app-build.json
- sed -i "s/__COMMIT__/$CI_COMMIT_SHORT_SHA/g" app-build.json
- sed -i "s/__DATE__/$(date +"%Y-%m-%d %T")/g" app-build.json
- echo "Building application"
- yarn build
test:
stage: test
script:
- yarn install
- echo "Checking format code eslint"
- yarn eslint .
- echo "Checking types"
- yarn tsc --noEmit
- echo "Running unit tests"
- yarn jest --roots src --passWithNoTests