-
Notifications
You must be signed in to change notification settings - Fork 15
224 lines (220 loc) · 8.51 KB
/
celest_auth.yaml
File metadata and controls
224 lines (220 loc) · 8.51 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
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
name: celest_auth
on:
pull_request:
paths:
- ".github/workflows/celest_auth.yaml"
- "packages/celest_auth/**"
# Prevent duplicate runs due to Graphite
# https://graphite.dev/docs/troubleshooting#why-are-my-actions-running-twice
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || ''}}
cancel-in-progress: true
env:
CELEST: ${{ github.workspace }}/apps/cli/bin/celest.dart
defaults:
run:
shell: bash
jobs:
test:
runs-on: macos-latest-xlarge
timeout-minutes: 15
steps:
- name: Git Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
- name: Setup Flutter
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # 2.18.0
with:
channel: stable
cache: true
- name: Get Packages
working-directory: packages/celest_auth
run: |
dart pub get
flutter pub get -C example
dart pub get -C example/celest
dart pub get -C example/celest/client
- name: Analyze
working-directory: packages/celest_auth
run: dart analyze --fatal-infos --fatal-warnings
- name: Format
working-directory: packages/celest_auth
run: dart format --set-exit-if-changed .
# - name: Test
# working-directory: packages/celest_auth
# run: dart test
test_darwin:
needs: [test]
runs-on: macos-latest-xlarge
timeout-minutes: 20
steps:
- name: Git Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
- name: Setup Flutter
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # 2.18.0
with:
cache: true
- name: Get Packages
working-directory: apps/cli
run: dart pub get
- name: Get Packages (Example)
working-directory: packages/celest_auth/example
run: flutter pub get
- name: Setup iOS Simulator
run: |
RUNTIME=$(xcrun simctl list runtimes | grep 'iOS 18' | tail -n 1 | cut -d' ' -f 7)
echo "Using runtime: $RUNTIME"
xcrun simctl create ios 'iPhone 16 Pro Max' $RUNTIME
echo "Booting simulator"
xcrun simctl boot ios
echo "Booted simulator"
- name: Integration Test (iOS)
working-directory: packages/celest_auth/example
run: dart run $CELEST start --verbose -- flutter test -d ios integration_test
- name: Integration Test (macOS)
working-directory: packages/celest_auth/example
run: dart run $CELEST start --verbose -- flutter test -d macos integration_test
# TODO: Keeps timing out on Linux. Fails hard on macOS...
# test_android:
# needs: [test]
# runs-on: macos-latest-xlarge
# timeout-minutes: 30
# steps:
# - name: Git Checkout
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
# - name: Setup Flutter
# uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # 2.18.0
# with:
# cache: true
# - name: Get Packages
# working-directory: apps/cli
# run: dart pub get
# - name: Get Packages (Example)
# working-directory: packages/celest_auth/example
# run: flutter pub get
# - name: Start Celest
# working-directory: packages/celest_auth/example
# run: dart run $CELEST start --verbose &
# - name: Build APK
# working-directory: packages/celest_auth/example
# run: flutter build apk --debug
# # - name: Enable KVM
# # run: |
# # echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
# # sudo udevadm control --reload-rules
# # sudo udevadm trigger --name-match=kvm
# - name: Test (API 31)
# uses: ReactiveCircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # 2.33.0
# with:
# # Matches `package:jni` compileSdkVersion
# # https://github.com/dart-lang/native/blob/001910c9f40d637cb25c19bb500fb89cebdf7450/pkgs/jni/android/build.gradle#L57C23-L57C25
# api-level: 31
# arch: arm64-v8a
# working-directory: packages/celest_auth/example
# script: flutter test -d emulator integration_test
# - name: Test (API 21)
# uses: ReactiveCircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # 2.33.0
# with:
# # Minimum supported API level
# # Should match build.gradle: https://github.com/celest-dev/celest/blob/main/packages/native/storage/android/build.gradle#L49
# api-level: 21
# arch: arm64-v8a
# working-directory: packages/celest_auth/example
# script: flutter test -d emulator integration_test
test_linux:
needs: [test]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Git Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
- name: Setup Flutter
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # 2.18.0
with:
cache: true
- name: Install Build Dependencies
run: |
sudo apt-get update && \
sudo apt-get install -y clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
- name: Setup Test Environment
run: tool/setup-ci.sh
- name: Get Packages
working-directory: apps/cli
run: dart pub get
- name: Get Packages (Example)
working-directory: packages/celest_auth/example
run: flutter pub get
- name: Integration Test (Linux)
working-directory: packages/celest_auth/example
run: |
# Headless tests require virtual display for the linux tests to run.
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
dart run $CELEST start --verbose -- flutter test -d linux integration_test
test_windows:
needs: [test]
runs-on: windows-latest
timeout-minutes: 15
steps:
- name: Git Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
- name: Setup Flutter
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # 2.18.0
with:
cache: true
- name: Get Packages
working-directory: apps/cli
run: dart pub get
- name: Get Packages (Example)
working-directory: packages/celest_auth/example
run: flutter pub get
- name: Test (Windows)
working-directory: packages/celest_auth/example
run: dart run "$CELEST" start --verbose -- flutter test -d windows integration_test
test_web:
needs: [test]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Git Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
- name: Setup Flutter
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # 2.18.0
with:
cache: true
- name: Setup Chromedriver
uses: nanasess/setup-chromedriver@v2
- name: Get Packages
working-directory: apps/cli
run: dart pub get
- name: Get Packages (Example)
working-directory: packages/celest_auth/example
run: flutter pub get
- name: Start Chromedriver
run: |
# Headless tests require virtual display for the chromedriver tests to run.
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
chromedriver --port=4444 &
- name: Test (Web/JS)
working-directory: packages/celest_auth/example
run: |
dart run "$CELEST" start --verbose -- \
flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/integration_test.dart \
-d web-server \
--debug \
--browser-name=chrome \
--no-headless
- name: Test (Web/WASM)
working-directory: packages/celest_auth/example
run: |
dart run "$CELEST" start --verbose -- \
flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/integration_test.dart \
-d web-server \
--debug \
--browser-name=chrome \
--no-headless \
--wasm