-
Notifications
You must be signed in to change notification settings - Fork 613
129 lines (127 loc) · 4.2 KB
/
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
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
name: CI
on:
pull_request:
push:
branches: master
jobs:
ci-check:
runs-on: ubuntu-22.04
name: JavaScript tests
strategy:
matrix:
node-version: ['18.x', '20.x', '22.x']
steps:
- uses: actions/checkout@v3
- name: Set Node.js version
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v3
with:
path: 'node_modules'
key: ${{ runner.os }}-node-${{ matrix.node-version }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn
- run: yarn ci:check
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.6
- name: Check docs build
run: cd docs-website && yarn install && cd .. && yarn docs:build
ios:
runs-on: macos-14
name: iOS tests
steps:
- uses: actions/checkout@v3
- name: Set Node.js version
uses: actions/setup-node@v3
with:
node-version: 22.x
- name: Set Xcode version
uses: maxim-lobanov/setup-xcode@v1.2.1
with:
xcode-version: 15.4
- name: ccache
uses: hendrikmuhs/ccache-action@v1
- name: cache node_modules
uses: actions/cache@v3
with:
path: 'node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn
- name: cache Pods
uses: actions/cache@v3
id: pods-cache
with:
path: native/iosTest/Pods
key: ${{ runner.os }}-pods-cache-${{ hashFiles('**/Podfile.lock') }}
- run: bundle install
- name: 'pod install'
if: true # steps.pods-cache.outputs.cache-hit != 'true'
run: yarn cocoapods
- run: yarn test:ios
- run: yarn swiftlint
android:
# https://github.com/ReactiveCircus/android-emulator-runner/issues/46
# TODO: We'd like to bump runner to macos-13 or macos-14, but it no longer works at api-level 29
# (can't find the right emulator). However, bumping api-level doesn't work either! Depending on
# configuration, it either can't find the right emulator or times out as the actual JS tests
# apparently do not complete. I've tried setting arch and target to no avail.
runs-on: macos-12
name: Android tests
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: Set Node.js version
uses: actions/setup-node@v3
with:
node-version: 22.x
- uses: actions/cache@v3
with:
path: 'node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn
- run: yarn dev:native &
- uses: gradle/actions/setup-gradle@v3
# See: https://github.com/android/compose-samples/actions/runs/27015993/workflow for ideas for caching
- name: run tests
uses: reactivecircus/android-emulator-runner@v2.31.0
with:
api-level: 29
# target: google_apis
# arch: x86_64
working-directory: ./native/androidTest
script: ./gradlew connectedAndroidTest
# - run: yarn ktlint
windows:
# FIXME: Windows port is unmaintained. If you're interested in sponsoring continued maintenance,
# please email me!
if: false
runs-on: windows-2022
name: Windows tests
steps:
- uses: actions/checkout@v3
- name: Set Node.js version
uses: actions/setup-node@v3
with:
node-version: 22.x
- uses: actions/cache@v3
with:
path: 'node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn --network-timeout 100000
# FIXME: concurrently seems broken on windows
# - run: yarn ci
- run: yarn test
- run: yarn eslint
- run: yarn flow
# FIXME: TS broken on Windows?
# - run: yarn test:typescript
# Build WatermelonTester and run in background
- run: yarn test:windows
# Give it some time to bundle
- run: sleep 90
# Start E2E runner to capture integration test results
- run: cd native/windowsE2E && yarn
- run: yarn test:windows:ci