-
Notifications
You must be signed in to change notification settings - Fork 1
100 lines (81 loc) · 2.65 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
92
93
94
95
96
97
98
99
100
name: Test Android & iOS
# Trigger the workflow manually or after push a commit
on: [ pull_request, workflow_dispatch ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyse:
name: Analyse Flutter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install dependencies
run: flutter pub get
# Uncomment this step to verify the use of 'dart format' on each commit.
# - name: Verify formatting
# run: dart format --output=none --set-exit-if-changed .
# run: dart format --output=none --set-exit-if-changed example
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: Analyze project source
run: flutter analyze --no-fatal-infos
# job responsible for running Flutter tests on iOS devices
ios:
name: Testing iOS
needs: analyse
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- uses: subosito/flutter-action@v2
with:
channel: "stable"
architecture: arm64 # optional value for v2 (use self-hosted mac mini)
- name: Install dependencies
run: flutter pub get
- name: Run pod update
working-directory: ./example/ios
run: pod update
- name: List all simulators
run: xcrun xctrace list devices
- name: Build & run all tests
run: sh .github/scripts/uitests_for_ios.sh
- name: Archive test results
uses: actions/upload-artifact@v4
with:
name: logs_ios
path: example/machine.log
# job responsible for running Flutter tests on Android devices
android:
name: Testing Android
needs: analyse
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
channel: "stable"
architecture: arm64 # optional value for v2 (use self-hosted mac mini)
- name: Install dependencies
run: flutter pub get
- name: Build & run all tests
run: sh .github/scripts/uitests_for_android.sh
- name: Archive test results
uses: actions/upload-artifact@v4
with:
name: logs_android
path: example/machine.log