-
Notifications
You must be signed in to change notification settings - Fork 1
189 lines (158 loc) · 4.66 KB
/
ci.yaml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: CI
on:
- push
- pull_request
permissions: {}
jobs:
code-lint:
name: Code Lint
runs-on: ubuntu-latest
permissions: {}
if: >-
${{
github.event_name == 'pull_request' ||
(
github.event_name == 'push' &&
github.ref == 'refs/heads/main'
)}}
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
registry.npmjs.org:443
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: true
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
cache: npm
- name: Bootstrap Dependencies
run: npm ci
- name: Verify Code Linting
run: "npm run lint:check"
commit-lint:
name: Commit Lint
runs-on: ubuntu-latest
permissions: {}
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
registry.npmjs.org:443
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
submodules: true
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
cache: npm
- name: Bootstrap Dependencies
run: npm ci
- name: Verify Commit Linting
run: |
npm exec \
--no \
--package=@commitlint/cli \
-- \
commitlint \
--from origin/main \
--to HEAD \
--verbose
test:
name: Test
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
coveralls.io:443
dl.google.com:443
objects.githubusercontent.com:443
github.com:443
registry.npmjs.org:443
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: true
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
cache: npm
- name: Bootstrap Dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Publish Coverage Report
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 # v2.3.0
if: ${{ github.event_name == 'push' }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: coverage/lcov.info
android-build:
name: Android Build
runs-on: ubuntu-latest
permissions: {}
if: >-
${{
github.event_name == 'pull_request' ||
(
github.event_name == 'push' &&
github.ref == 'refs/heads/main'
)}}
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
dl.google.com:443
github.com:443
maven.google.com:443
objects.githubusercontent.com:443
oss.sonatype.org:443
plugins-artifacts.gradle.org:443
plugins.gradle.org:443
registry.npmjs.org:443
repo.maven.apache.org:443
services.gradle.org:443
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: true
- name: Setup Java
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: temurin
java-version: 17
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
cache: npm
- name: Setup Android SDK
uses: android-actions/setup-android@00854ea68c109d98c75d956347303bf7c45b0277 # v3.2.1
- name: Bootstrap Dependencies
run: npm ci
- name: Build Android APK
run: npm run build:android:apk