-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (92 loc) · 3.13 KB
/
Copy pathtest.yml
File metadata and controls
113 lines (92 loc) · 3.13 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
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@v6
- uses: actions/setup-java@v5
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:
# Checkout into a directory matching the plugin name (didomi_sdk) so
# Flutter's SPM integration generates the right symlink identity on
# Flutter 3.44+ (see build.yml for full context).
- uses: actions/checkout@v6
with:
path: didomi_sdk
- uses: actions/setup-java@v5
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
working-directory: ./didomi_sdk
run: flutter pub get
- name: Add Homebrew to PATH
run: echo "/opt/homebrew/bin" >> $GITHUB_PATH
- name: Run pod update
working-directory: ./didomi_sdk/example/ios
run: pod update
- name: List all simulators
run: xcrun xctrace list devices
- name: Build & run all tests
working-directory: ./didomi_sdk
run: sh .github/scripts/uitests_for_ios.sh
- name: Archive test results
if: ${{ failure() }}
uses: actions/upload-artifact@v7
with:
name: logs_ios
path: didomi_sdk/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@v6
- uses: actions/setup-java@v5
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
if: ${{ failure() }}
uses: actions/upload-artifact@v7
with:
name: logs_android
path: example/machine.log