-
-
Notifications
You must be signed in to change notification settings - Fork 203
83 lines (75 loc) · 2.13 KB
/
main.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
name: Build
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
name: Quality Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: stable
- name: Get Packages
run: flutter pub get
- name: Analyze
run: flutter analyze
- name: Format
run: dart format . --set-exit-if-changed
- name: Publishability
run: flutter pub publish --dry-run
- name: Test
run: flutter test --coverage
- uses: VeryGoodOpenSource/very_good_coverage@v1.2.0
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
android:
name: Android Integration Tests
needs: quality
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: stable
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
- name: Run Android Integration Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
working-directory: example
script: flutter test integration_test/android_test.dart -d emulator-5554
# iOS Test based on https://medium.com/flutter-community/run-flutter-driver-tests-on-github-actions-13c639c7e4ab
# by @kate_sheremet
ios:
name: iOS Integration Tests
needs: quality
strategy:
matrix:
device:
- "iPhone 13"
fail-fast: false
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: stable
- uses: futureware-tech/simulator-action@v1
id: simulator
with:
model: ${{ matrix.device }}
- name: "Run iOS integration tests"
run: flutter test integration_test/ios_test.dart -d ${{steps.simulator.outputs.udid}}
working-directory: example