-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (73 loc) · 2.05 KB
/
test.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
name: test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
test_web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Flutter
uses: ./.github/actions/flutter-setup
- name: run web tests & prepare test-results.json
run: flutter test --file-reporter="json:test-results.json"
- name: Store Testresults
uses: actions/upload-artifact@v3
with:
name: test-results.json
path: ./test-results.json
test_android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Flutter
uses: ./.github/actions/flutter-setup
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
cache: "gradle"
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Cache Android SDK
id: androidSdk
uses: actions/cache@v4
with:
path: ~/Android/Sdk
key: androidSdk
- run: example/android/gradlew
- name: Run Tests
run: make test-android
test_ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Flutter
uses: ./.github/actions/flutter-setup
- uses: SwiftyLab/setup-swift@latest
with:
swift-version: "5.10.0"
- name: Get Swift Version
run: swift --version
- name: Get Xcode version
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app
run: xcodebuild -version
- name: Cache Pods
id: pods
uses: actions/cache@v4
with:
path: example/ios/Pods
key: pods-cache--${{ hashFiles('example/ios/podfile.lock') }}
- name: Cache Xcode DerivedData
uses: irgaly/[email protected]
with:
key: xcode-deriveddata
- run: cd example/ios; pod install
- name: Run Tests
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app
run: make test-ios