Skip to content

Commit 2fdc26e

Browse files
committed
ci: add workflow for flutter beta
1 parent 365f8f9 commit 2fdc26e

2 files changed

Lines changed: 101 additions & 0 deletions

File tree

.github/workflows/flutter-beta.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Build Flutter Beta
2+
3+
on:
4+
push:
5+
branches:
6+
- flutter-beta
7+
pull_request:
8+
branches:
9+
- flutter-beta
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
quality:
17+
name: Quality Checks
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- uses: subosito/flutter-action@v1
24+
with:
25+
channel: beta
26+
- name: Get Packages
27+
run: flutter pub get
28+
- name: Analyze
29+
run: flutter analyze
30+
- name: Format
31+
run: dart format . --set-exit-if-changed
32+
- name: Publishability
33+
run: flutter pub publish --dry-run
34+
- name: Test
35+
run: flutter test --coverage
36+
- name: Archieve Golden Failures
37+
if: failure()
38+
uses: actions/upload-artifact@v3
39+
with:
40+
name: Golden failures
41+
retention-days: 2
42+
path: |
43+
**/test/**/failures/**/*.*
44+
- name: Upload coverage to Codecov
45+
uses: codecov/codecov-action@v1
46+
with:
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
- uses: VeryGoodOpenSource/very_good_coverage@v1.2.0
49+
50+
android:
51+
name: Android Integration Tests
52+
needs: quality
53+
runs-on: macos-latest
54+
55+
steps:
56+
- uses: actions/checkout@v2
57+
- uses: subosito/flutter-action@v1
58+
with:
59+
channel: beta
60+
- uses: actions/setup-java@v2
61+
with:
62+
distribution: 'temurin'
63+
java-version: '11'
64+
- name: Run Android Integration Tests
65+
uses: reactivecircus/android-emulator-runner@v2
66+
with:
67+
api-level: 29
68+
working-directory: example
69+
script: flutter test integration_test/android_test.dart -d emulator-5554
70+
71+
# iOS Test based on https://medium.com/flutter-community/run-flutter-driver-tests-on-github-actions-13c639c7e4ab
72+
# by @kate_sheremet
73+
ios:
74+
name: iOS Integration Tests
75+
needs: quality
76+
strategy:
77+
matrix:
78+
device:
79+
- "iPhone 14"
80+
fail-fast: false
81+
runs-on: macos-13
82+
steps:
83+
- uses: actions/checkout@v2
84+
- uses: maxim-lobanov/setup-xcode@v1
85+
with:
86+
xcode-version: latest
87+
- name: Download iOS 17
88+
run: xcodebuild -downloadPlatform ios
89+
- uses: subosito/flutter-action@v1
90+
with:
91+
channel: beta
92+
- uses: futureware-tech/simulator-action@v1
93+
id: simulator
94+
with:
95+
model: ${{ matrix.device }}
96+
- name: "Run iOS integration tests"
97+
run: flutter test integration_test/ios_test.dart -d ${{steps.simulator.outputs.udid}}
98+
working-directory: example

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77
- dev
88
pull_request:
9+
branches:
10+
- main
11+
- dev
912

1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.ref }}

0 commit comments

Comments
 (0)