forked from fluttercommunity/flutter_workmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (84 loc) · 2.49 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Test
run: |
flutter pub get
flutter test
native_ios_tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Build iOS App
run: cd example && flutter build ios --debug --no-codesign
- name: Run native iOS tests
run: cd example/ios && xcodebuild -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12,OS=16.2' test
native_android_tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v1
with:
java-version: 17
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- name: Build Android App
run: cd example && flutter build apk --debug
- name: Run native Android tests
run: cd example/android && gradle workmanager:test
drive_ios:
strategy:
matrix:
device:
- "iPhone 12 Pro"
fail-fast: false
runs-on: macos-latest
steps:
- uses: futureware-tech/simulator-action@v1
with:
model: '${{ matrix.device }}'
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
# Run flutter integrate tests
- name: Run Flutter integration tests
run: cd example && flutter test integration_test/workmanager_integration_test.dart
drive_android:
runs-on: macos-latest
#creates a build matrix for your jobs
strategy:
#set of different configurations of the virtual environment.
matrix:
api-level: [29]
# api-level: [21, 29]
target: [default]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v1
with:
java-version: 17
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Run Flutter Driver tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
script: cd example && flutter test integration_test/workmanager_integration_test.dart