Skip to content

Commit

Permalink
Run tests on virtual devices on PR and run tests for patrol develop o…
Browse files Browse the repository at this point in the history
…n patrol_cli label (#2266)

* Run workflows for virtual devices on PR

* Run cirrus workflows on patrol_cli label

* Set concurrency to one on PR or ref
  • Loading branch information
fylyppo authored Jul 18, 2024
1 parent 600d614 commit c3d5c13
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 27 deletions.
20 changes: 8 additions & 12 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
test_linux_task:
name: Test `patrol develop` on Linux
required_pr_labels:
- 'package: patrol_cli'
- 'package: patrol'
- 'cirrusci'
required_pr_labels:
- "package: patrol_cli"
container:
image: ghcr.io/cirruslabs/flutter:stable
cpu: 6
memory: 10G
kvm: 'true'
kvm: "true"
env:
PATH: $HOME/.pub-cache/bin:$HOME/fvm/default/bin:$CIRRUS_WORKING_DIR/fvm:${PATH}
FLUTTER_VERSION: '3.22.0'
EMULATOR_API_LEVEL: '34'
FLUTTER_VERSION: "3.22.0"
EMULATOR_API_LEVEL: "34"
EMULATOR_ABI: google_apis_playstore;x86_64
EMULATOR_IMAGE: system-images;android-${EMULATOR_API_LEVEL};${EMULATOR_ABI}
timeout_in: 30m
Expand Down Expand Up @@ -62,15 +60,13 @@ test_linux_task:
test_macos_task:
name: Test `patrol develop` on macOS
required_pr_labels:
- 'package: patrol_cli'
- 'package: patrol'
- 'cirrusci'
required_pr_labels:
- "package: patrol_cli"
macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
env:
PATH: $HOME/.pub-cache/bin:$HOME/fvm/default/bin:${PATH}
FLUTTER_VERSION: '3.22.0'
FLUTTER_VERSION: "3.22.0"
timeout_in: 30m

set_up_fvm_script: |
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/test-android-emulator-webview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ name: test android emulator webview
on:
workflow_dispatch:
schedule:
- cron: '0 23 * * *'
- cron: "0 23 * * *"
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
run_tests:
Expand All @@ -18,8 +23,8 @@ jobs:
strategy:
fail-fast: false
matrix:
flutter-version: ['3.22.x']
flutter-channel: ['stable']
flutter-version: ["3.22.x"]
flutter-channel: ["stable"]

defaults:
run:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/test-android-emulator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ name: test android emulator
on:
workflow_dispatch:
schedule:
- cron: '0 */12 * * *'
- cron: "0 */12 * * *"
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
run_tests:
Expand All @@ -19,8 +24,8 @@ jobs:
strategy:
fail-fast: false
matrix:
flutter-version: ['3.22.x']
flutter-channel: ['stable']
flutter-version: ["3.22.x"]
flutter-channel: ["stable"]

defaults:
run:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/test-ios-simulator-webview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ name: test ios simulator webview
on:
workflow_dispatch:
schedule:
- cron: '0 23 * * *'
- cron: "0 23 * * *"
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
run_tests:
Expand All @@ -19,11 +24,11 @@ jobs:
strategy:
fail-fast: false
matrix:
flutter-version: ['3.22.x']
flutter-channel: ['stable']
flutter-version: ["3.22.x"]
flutter-channel: ["stable"]
device_model: [iPhone 14]
os: [iOS]
os_version: ['17.2']
os_version: ["17.2"]

defaults:
run:
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/test-ios-simulator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ name: test ios simulator
on:
workflow_dispatch:
schedule:
- cron: '0 */12 * * *'
- cron: "0 */12 * * *"
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
run_tests:
Expand All @@ -20,11 +25,12 @@ jobs:
strategy:
fail-fast: false
matrix:
flutter-version: ['3.22.x']
flutter-channel: ['stable']
device_model: [iPhone SE (3rd generation), iPhone 14, iPad (10th generation)]
flutter-version: ["3.22.x"]
flutter-channel: ["stable"]
device_model:
[iPhone SE (3rd generation), iPhone 14, iPad (10th generation)]
os: [iOS]
os_version: ['17.2']
os_version: ["17.2"]

defaults:
run:
Expand Down

0 comments on commit c3d5c13

Please sign in to comment.