-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (78 loc) · 2.36 KB
/
Copy pathci.yml
File metadata and controls
95 lines (78 loc) · 2.36 KB
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
name: Mobile CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: mobile-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
name: TypeScript, source pin, and Android build
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- name: Set up Java
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 21
cache: gradle
- name: Install mobile dependencies
run: npm ci
- name: Prepare exact ZenNotes source
run: npm run source:prepare
- name: Reject high-severity production advisories
run: |
npm audit --omit=dev --audit-level=high
npm --prefix .zennotes-source audit --omit=dev --audit-level=high
- name: Test and typecheck bridges
run: |
npm test
npm run typecheck
npm run upstream
- name: Build and sync Android project
run: npm run sync
- name: Run native unit tests, lint, and assemble
working-directory: android
run: ./gradlew --no-daemon testDebugUnitTest lintDebug assembleDebug
emulator-smoke:
name: Android emulator launch
needs: verify
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- name: Set up Java
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 21
- name: Build and sync Android project
run: |
npm ci
npm run sync
- name: Launch app and run instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 35
arch: x86_64
disable-animations: true
# The runner's own wait accepts half-booted VMs (system services
# down); the gate script holds the tests until they answer.
script: |
sh tooling/ci-wait-for-emulator.sh
cd android && ./gradlew --no-daemon :app:connectedDebugAndroidTest