@@ -48,3 +48,180 @@ jobs:
4848 - name : Build Example (Web)
4949 working-directory : packages/celest_auth/example
5050 run : flutter build web
51+ test_darwin :
52+ needs : [test]
53+ runs-on : macos-latest-xlarge
54+ timeout-minutes : 20
55+ steps :
56+ - name : Git Checkout
57+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
58+ - name : Setup Flutter
59+ uses : subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # 2.18.0
60+ with :
61+ cache : true
62+ - name : Get Packages
63+ working-directory : apps/cli
64+ run : dart pub get
65+ - name : Get Packages (Example)
66+ working-directory : packages/celest_auth/example
67+ run : flutter pub get
68+ - name : Setup iOS Simulator
69+ run : |
70+ RUNTIME=$(xcrun simctl list runtimes | grep 'iOS 18' | tail -n 1 | cut -d' ' -f 7)
71+ echo "Using runtime: $RUNTIME"
72+ xcrun simctl create ios 'iPhone 16 Pro Max' $RUNTIME
73+ echo "Booting simulator"
74+ xcrun simctl boot ios
75+ echo "Booted simulator"
76+ - name : Integration Test (iOS)
77+ working-directory : packages/celest_auth/example
78+ run : dart run $CELEST start --verbose -- flutter test -d ios integration_test
79+ - name : Integration Test (macOS)
80+ working-directory : packages/celest_auth/example
81+ run : dart run $CELEST start --verbose -- flutter test -d macos integration_test
82+ # TODO: Keeps timing out on Linux. Fails hard on macOS...
83+ # test_android:
84+ # needs: [test]
85+ # runs-on: macos-latest-xlarge
86+ # timeout-minutes: 30
87+ # steps:
88+ # - name: Git Checkout
89+ # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
90+ # - name: Setup Flutter
91+ # uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # 2.18.0
92+ # with:
93+ # cache: true
94+ # - name: Get Packages
95+ # working-directory: apps/cli
96+ # run: dart pub get
97+ # - name: Get Packages (Example)
98+ # working-directory: packages/celest_auth/example
99+ # run: flutter pub get
100+ # - name: Start Celest
101+ # working-directory: packages/celest_auth/example
102+ # run: dart run $CELEST start --verbose &
103+ # - name: Build APK
104+ # working-directory: packages/celest_auth/example
105+ # run: flutter build apk --debug
106+ # # - name: Enable KVM
107+ # # run: |
108+ # # echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
109+ # # sudo udevadm control --reload-rules
110+ # # sudo udevadm trigger --name-match=kvm
111+ # - name: Test (API 31)
112+ # uses: ReactiveCircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # 2.33.0
113+ # with:
114+ # # Matches `package:jni` compileSdkVersion
115+ # # https://github.com/dart-lang/native/blob/001910c9f40d637cb25c19bb500fb89cebdf7450/pkgs/jni/android/build.gradle#L57C23-L57C25
116+ # api-level: 31
117+ # arch: arm64-v8a
118+ # working-directory: packages/celest_auth/example
119+ # script: flutter test -d emulator integration_test
120+ # - name: Test (API 21)
121+ # uses: ReactiveCircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # 2.33.0
122+ # with:
123+ # # Minimum supported API level
124+ # # Should match build.gradle: https://github.com/celest-dev/celest/blob/main/packages/native/storage/android/build.gradle#L49
125+ # api-level: 21
126+ # arch: arm64-v8a
127+ # working-directory: packages/celest_auth/example
128+ # script: flutter test -d emulator integration_test
129+ test_linux :
130+ needs : [test]
131+ runs-on : ubuntu-latest
132+ timeout-minutes : 15
133+ steps :
134+ - name : Git Checkout
135+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
136+ - name : Setup Flutter
137+ uses : subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # 2.18.0
138+ with :
139+ cache : true
140+ - name : Install Build Dependencies
141+ run : |
142+ sudo apt-get update && \
143+ sudo apt-get install -y clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
144+ - name : Setup Test Environment
145+ run : tool/setup-ci.sh
146+ - name : Get Packages
147+ working-directory : apps/cli
148+ run : dart pub get
149+ - name : Get Packages (Example)
150+ working-directory : packages/celest_auth/example
151+ run : flutter pub get
152+ - name : Integration Test (Linux)
153+ working-directory : packages/celest_auth/example
154+ run : |
155+ # Headless tests require virtual display for the linux tests to run.
156+ export DISPLAY=:99
157+ sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
158+ dart run $CELEST start --verbose -- flutter test -d linux integration_test
159+ test_windows :
160+ needs : [test]
161+ runs-on : windows-latest
162+ timeout-minutes : 15
163+ steps :
164+ - name : Git Checkout
165+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
166+ - name : Setup Flutter
167+ uses : subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # 2.18.0
168+ with :
169+ cache : true
170+ - name : Get Packages
171+ working-directory : apps/cli
172+ run : dart pub get
173+ - name : Get Packages (Example)
174+ working-directory : packages/celest_auth/example
175+ run : flutter pub get
176+ - name : Test (Windows)
177+ working-directory : packages/celest_auth/example
178+ run : dart run "$CELEST" start --verbose -- flutter test -d windows integration_test
179+ test_web :
180+ needs : [test]
181+ runs-on : ubuntu-latest
182+ timeout-minutes : 10
183+ steps :
184+ - name : Git Checkout
185+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
186+ - name : Setup Flutter
187+ uses : subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # 2.18.0
188+ with :
189+ cache : true
190+ - name : Setup Chromedriver
191+ uses : nanasess/setup-chromedriver@v2
192+ - name : Get Packages
193+ working-directory : apps/cli
194+ run : dart pub get
195+ - name : Get Packages (Example)
196+ working-directory : packages/celest_auth/example
197+ run : flutter pub get
198+ - name : Start Chromedriver
199+ run : |
200+ # Headless tests require virtual display for the chromedriver tests to run.
201+ export DISPLAY=:99
202+ sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
203+
204+ chromedriver --port=4444 &
205+ - name : Test (Web/JS)
206+ working-directory : packages/celest_auth/example
207+ run : |
208+ dart run "$CELEST" start --verbose -- \
209+ flutter drive \
210+ --driver=test_driver/integration_test.dart \
211+ --target=integration_test/integration_test.dart \
212+ -d web-server \
213+ --debug \
214+ --browser-name=chrome \
215+ --no-headless
216+ - name : Test (Web/WASM)
217+ working-directory : packages/celest_auth/example
218+ run : |
219+ dart run "$CELEST" start --verbose -- \
220+ flutter drive \
221+ --driver=test_driver/integration_test.dart \
222+ --target=integration_test/integration_test.dart \
223+ -d web-server \
224+ --debug \
225+ --browser-name=chrome \
226+ --no-headless \
227+ --wasm
0 commit comments