Skip to content

Commit 241ff01

Browse files
committed
Don't run integration tests for PRs
Addressed @mmcc007 comments
1 parent 24dacfc commit 241ff01

File tree

1 file changed

+62
-27
lines changed

1 file changed

+62
-27
lines changed

.cirrus.yml

Lines changed: 62 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,42 @@
11
timeout_in: 30m
22

33
task:
4+
# this task should fail fast or rely on 'depends_on' for all other tasks
5+
name: Tests (Unit)
46
container:
57
image: cirrusci/flutter:latest
6-
name: Tests (Unit)
78
pub_cache:
89
folder: ~/.pub-cache
910
activate_coverage_script: pub global activate coverage
1011
tests_script: ./scripts/runTests.sh
1112

1213
task:
14+
name: Integration Tests for $app_arch (Linux)
15+
only_if: $CIRRUS_PR == ''
16+
skip: '!changesInclude(".cirrus.yml", "$app_arch/*", "$app_arch/**/*")'
17+
depends_on:
18+
- Tests (Unit)
1319
env:
1420
EMULATOR_API_LEVEL: 22
1521
ANDROID_ABI: "default;armeabi-v7a"
1622
matrix:
17-
SHARD: bloc_flutter
18-
SHARD: built_redux
19-
SHARD: bloc_library
20-
SHARD: firestore_redux
21-
SHARD: inherited_widget
22-
SHARD: mvc
23-
SHARD: mvi_flutter
24-
SHARD: mvu
25-
SHARD: redurx
26-
SHARD: redux
27-
SHARD: scoped_model
28-
SHARD: simple_bloc_flutter
29-
SHARD: vanilla
30-
31-
allow_failures: $SHARD == "mvu" || $SHARD == "redurx"
32-
33-
matrix:
34-
- name: Integration Tests for $SHARD (Linux)
35-
container:
36-
image: cirrusci/flutter:latest
37-
- name: Integration Tests for $SHARD (macOS)
38-
osx_instance:
39-
image: mojave-flutter
40-
skip: '!changesInclude(".cirrus.yml", "$SHARD/*", "$SHARD/**/*")'
23+
app_arch: bloc_flutter
24+
app_arch: bloc_library
25+
app_arch: built_redux
26+
app_arch: firestore_redux
27+
app_arch: frideos_library
28+
app_arch: inherited_widget
29+
app_arch: mvc
30+
app_arch: mvi_flutter
31+
app_arch: mvu
32+
app_arch: redurx
33+
app_arch: redux
34+
app_arch: scoped_model
35+
app_arch: simple_bloc_flutter
36+
app_arch: vanilla
37+
container:
38+
image: cirrusci/flutter:latest
39+
allow_failures: $app_arch == "mvu" || $app_arch == "redurx"
4140
install_images_script: sdkmanager "system-images;android-$EMULATOR_API_LEVEL;$ANDROID_ABI"
4241
create_device_script:
4342
echo no | avdmanager create avd --force -n test -k "system-images;android-$EMULATOR_API_LEVEL;$ANDROID_ABI"
@@ -48,6 +47,42 @@ task:
4847
wait_for_emulator_script:
4948
- ./scripts/android-wait-for-emulator.sh
5049
- adb shell input keyevent 82
51-
doctor_script: flutter doctor
50+
doctor_script: flutter doctor -v
51+
devices_script: flutter devices
52+
ci_script: ./scripts/ci.sh ./$app_arch || ./scripts/ci.sh ./$app_arch
53+
54+
task:
55+
name: Integration Tests for $app_arch (macOS)
56+
only_if: $CIRRUS_PR == ''
57+
skip: '!changesInclude(".cirrus.yml", "$app_arch/*", "$app_arch/**/*")'
58+
depends_on:
59+
- Tests (Unit)
60+
env:
61+
matrix:
62+
app_arch: bloc_flutter
63+
app_arch: bloc_library
64+
app_arch: built_redux
65+
app_arch: firestore_redux
66+
app_arch: frideos_library
67+
app_arch: inherited_widget
68+
app_arch: mvc
69+
app_arch: mvi_flutter
70+
app_arch: mvu
71+
app_arch: redurx
72+
app_arch: redux
73+
app_arch: scoped_model
74+
app_arch: simple_bloc_flutter
75+
app_arch: vanilla
76+
allow_failures: $app_arch == "mvu"
77+
osx_instance:
78+
image: mojave-flutter
79+
simulator_script:
80+
- xcrun simctl list devicetypes
81+
- xcrun simctl list runtimes
82+
# create simulator
83+
- udid=$(xcrun simctl create "iPhone X" com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-12-1)
84+
# boot simulator
85+
- xcrun simctl boot $udid
86+
doctor_script: flutter doctor -v
5287
devices_script: flutter devices
53-
ci_script: ./scripts/ci.sh ./$SHARD || ./scripts/ci.sh ./$SHARD
88+
ci_script: ./scripts/ci.sh ./$app_arch || ./scripts/ci.sh ./$app_arch

0 commit comments

Comments
 (0)