-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
54 lines (48 loc) · 942 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
image: node:16-alpine
cache:
key: ${CI_COMMIT_REF_SLUG} # per branch
paths:
- .npm/
- node_modules
stages:
- Install
- Testing
- Release
- Build
Dependencies:
stage: Install
interruptible: true
script:
- npm ci
Lint:
stage: Testing
needs: [Dependencies]
interruptible: true
script:
- npm ci --cache .npm --prefer-offline
- npm run lint:eslint
- npm run lint:prettier
Test:
stage: Testing
needs: [Dependencies]
interruptible: true
script:
- npm ci --cache .npm --prefer-offline
- npm run test
artifacts:
when: always
paths:
- coverage
expire_in: 1 days
Build Android:
stage: Build
image: reactnativecommunity/react-native-android:latest
only:
- main
script:
- npm ci --cache .npm --prefer-offline
- npm run android:release
artifacts:
paths:
- android/app/build/outputs/apk/release/app-release.apk
expire_in: 7 days