-
Notifications
You must be signed in to change notification settings - Fork 9
165 lines (137 loc) · 4.71 KB
/
build.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: Build and Test
on: [push, pull_request]
jobs:
build:
name: Run unit tests
runs-on: ubuntu-latest
strategy:
matrix:
flutter: ['3.19.0']
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter }}
channel: 'stable'
- run: flutter pub get
- run: flutter test
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
channel: 'stable'
- run: flutter pub get
- run: flutter analyze
- run: dart format --set-exit-if-changed .
build-android:
name: Integration tests on Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Configure JDK
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
# -- Micro --
- name: Cache Micro
id: cache-micro
uses: actions/cache@v2
with:
path: micro.jar
key: ${{ runner.os }}-micro
- name: Get micro
if: steps.cache-micro.outputs.cache-hit != 'true'
run: curl -o micro.jar -L https://github.com/snowplow-incubator/snowplow-micro/releases/download/micro-1.1.2/snowplow-micro-1.1.2.jar
- name: Run Micro in background
run: java -jar micro.jar --collector-config example/tool/micro.conf --iglu example/tool/iglu.json &
- name: Wait on Micro endpoint
timeout-minutes: 2
run: while ! nc -z '0.0.0.0' 9090; do sleep 1; done
# -- Integration tests --
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
channel: 'stable'
- name: Run Flutter Driver tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
target: default
arch: x86_64
profile: Nexus 6
working-directory: example
script: ./tool/e2e_tests.sh http://10.0.2.2:9090
build-ios:
name: Integration tests on iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
# -- Micro --
- name: Cache Micro
id: cache-micro
uses: actions/cache@v2
with:
path: micro.jar
key: ${{ runner.os }}-micro
- name: Get micro
if: steps.cache-micro.outputs.cache-hit != 'true'
run: curl -o micro.jar -L https://github.com/snowplow-incubator/snowplow-micro/releases/download/micro-1.1.2/snowplow-micro-1.1.2.jar
- name: Run Micro in background
run: java -jar micro.jar --collector-config example/tool/micro.conf --iglu example/tool/iglu.json &
- name: Wait on Micro endpoint
timeout-minutes: 2
run: while ! nc -z '0.0.0.0' 9090; do sleep 1; done
# -- Integration tests --
- name: "Start Simulator"
uses: futureware-tech/simulator-action@v3
with:
model: iPhone 14
erase_before_boot: true
shutdown_after_job: true
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
channel: 'stable'
- run: "flutter clean"
- name: Run tests
working-directory: example
run: ./tool/e2e_tests.sh http://0.0.0.0:9090
build-web:
name: Integration tests on Web
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# -- Micro --
- name: Cache Micro
id: cache-micro
uses: actions/cache@v2
with:
path: micro.jar
key: ${{ runner.os }}-micro
- name: Get micro
if: steps.cache-micro.outputs.cache-hit != 'true'
run: curl -o micro.jar -L https://github.com/snowplow-incubator/snowplow-micro/releases/download/micro-1.1.2/snowplow-micro-1.1.2.jar
- name: Run Micro in background
run: java -jar micro.jar --collector-config example/tool/micro.conf --iglu example/tool/iglu.json &
- name: Wait on Micro endpoint
timeout-minutes: 2
run: while ! nc -z '0.0.0.0' 9090; do sleep 1; done
# -- Integration tests --
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
channel: 'stable'
- run: chromedriver --port=4444 &
- name: Run tests
working-directory: example
run: ./tool/e2e_tests.sh http://0.0.0.0:9090 "-d web-server"