Skip to content

Commit b2cdb85

Browse files
koji-1009jonasfj
andauthored
chore: Split ci coverage job (#179)
* chore: Split coverage job * chore: Set timeout-minutes * Update .github/workflows/test.yml Co-authored-by: Jonas Finnemann Jensen <[email protected]> * chore: Set timeout-minutes 15 --------- Co-authored-by: Jonas Finnemann Jensen <[email protected]>
1 parent 12ca012 commit b2cdb85

File tree

1 file changed

+60
-22
lines changed

1 file changed

+60
-22
lines changed

.github/workflows/test.yml

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
lints:
1313
name: Format + Lints
1414
runs-on: ubuntu-latest
15+
timeout-minutes: 15
1516
steps:
1617
- uses: actions/checkout@v4
1718
- uses: subosito/flutter-action@v2
@@ -24,6 +25,7 @@ jobs:
2425
linux:
2526
name: Linux desktop / Chrome / Firefox
2627
runs-on: ubuntu-latest
28+
timeout-minutes: 15
2729
steps:
2830
- uses: actions/checkout@v4
2931
- uses: subosito/flutter-action@v2
@@ -50,19 +52,10 @@ jobs:
5052
--target=integration_test/webcrypto_test.dart \
5153
-d chrome
5254
- run: xvfb-run flutter pub run test -p vm,chrome,firefox
53-
# Test with coverage collection as a separate step.
54-
# This will run in debug mode, so we test both with and without coverage.
55-
- run: xvfb-run flutter pub run test -p vm,chrome,firefox --coverage ./coverage
56-
# Report collected coverage
57-
- name: Convert coverage to lcov
58-
run: dart run coverage:format_coverage -i ./coverage -o ./coverage/lcov.info --lcov --report-on lib/
59-
- uses: coverallsapp/github-action@v2
60-
with:
61-
flag-name: linux
62-
parallel: true
6355
macos-14:
6456
name: MacOS 14 desktop / Chrome / Firefox
6557
runs-on: macos-14 # Test with xcode 15
58+
timeout-minutes: 15
6659
steps:
6760
- uses: actions/checkout@v4
6861
- uses: subosito/flutter-action@v2
@@ -98,6 +91,7 @@ jobs:
9891
macos-15:
9992
name: MacOS 15 desktop / Chrome / Firefox
10093
runs-on: macos-15 # Test with xcode 16
94+
timeout-minutes: 15
10195
steps:
10296
- uses: actions/checkout@v4
10397
- uses: subosito/flutter-action@v2
@@ -125,6 +119,7 @@ jobs:
125119
windows:
126120
name: Windows desktop / Chrome / Firefox
127121
runs-on: windows-latest
122+
timeout-minutes: 15
128123
steps:
129124
- uses: ilammy/setup-nasm@v1
130125
- uses: actions/checkout@v4
@@ -151,19 +146,10 @@ jobs:
151146
--target=integration_test/webcrypto_test.dart \
152147
-d chrome
153148
- run: flutter pub run test -p vm,chrome,firefox
154-
# Test with coverage collection as a separate step.
155-
# This will run in debug mode, so we test both with and without coverage.
156-
- run: flutter pub run test -p vm,chrome,firefox --coverage ./coverage
157-
# Report collected coverage
158-
- name: Convert coverage to lcov
159-
run: dart run coverage:format_coverage -i ./coverage -o ./coverage/lcov.info --lcov --report-on lib/
160-
- uses: coverallsapp/github-action@v2
161-
with:
162-
flag-name: windows
163-
parallel: true
164149
ios:
165150
name: iOS emulator (iPhone)
166151
runs-on: macos-14
152+
timeout-minutes: 15
167153
steps:
168154
- uses: actions/checkout@v4
169155
- uses: subosito/flutter-action@v2
@@ -182,6 +168,7 @@ jobs:
182168
android:
183169
name: Android emulator
184170
runs-on: ubuntu-latest
171+
timeout-minutes: 15
185172
steps:
186173
- uses: actions/checkout@v4
187174
- uses: subosito/flutter-action@v2
@@ -207,12 +194,63 @@ jobs:
207194
api-level: 28
208195
working-directory: ./example
209196
script: flutter test integration_test/webcrypto_test.dart -d android
197+
linux-coverage:
198+
name: Linux desktop / Chrome / Firefox (coverage)
199+
runs-on: ubuntu-latest
200+
timeout-minutes: 15
201+
steps:
202+
- uses: actions/checkout@v4
203+
- uses: subosito/flutter-action@v2
204+
with:
205+
channel: 'stable'
206+
cache: true
207+
- name: Configure Flutter
208+
run: |
209+
sudo apt-get update -y
210+
sudo apt-get install -y ninja-build libgtk-3-dev
211+
flutter config --no-analytics
212+
- run: flutter pub get
213+
- run: flutter pub run webcrypto:setup
214+
- run: xvfb-run flutter pub run test -p vm,chrome,firefox --coverage ./coverage
215+
# Report collected coverage
216+
- name: Convert coverage to lcov
217+
run: dart run coverage:format_coverage -i ./coverage -o ./coverage/lcov.info --lcov --report-on lib/
218+
- uses: coverallsapp/github-action@v2
219+
with:
220+
flag-name: linux
221+
parallel: true
222+
windows-coverage:
223+
name: Windows desktop / Chrome / Firefox (coverage)
224+
runs-on: windows-latest
225+
timeout-minutes: 15
226+
steps:
227+
- uses: ilammy/setup-nasm@v1
228+
- uses: actions/checkout@v4
229+
- uses: subosito/flutter-action@v2
230+
with:
231+
channel: 'stable'
232+
cache: true
233+
- name: Configure Flutter
234+
run: |
235+
flutter config --no-analytics
236+
- run: flutter pub get
237+
- run: flutter pub run webcrypto:setup
238+
- run: flutter test
239+
- run: flutter pub run test -p vm,chrome,firefox --coverage ./coverage
240+
# Report collected coverage
241+
- name: Convert coverage to lcov
242+
run: dart run coverage:format_coverage -i ./coverage -o ./coverage/lcov.info --lcov --report-on lib/
243+
- uses: coverallsapp/github-action@v2
244+
with:
245+
flag-name: windows
246+
parallel: true
210247
coverage:
211248
name: Report to coveralls
212249
runs-on: ubuntu-latest
250+
timeout-minutes: 15
213251
needs:
214-
- linux
215-
- windows
252+
- linux-coverage
253+
- windows-coverage
216254
steps:
217255
- uses: coverallsapp/github-action@v2
218256
with:

0 commit comments

Comments
 (0)