Skip to content

Commit 16a54f3

Browse files
committed
ci: Run CI on all platforms
1 parent cc26ce5 commit 16a54f3

File tree

1 file changed

+44
-17
lines changed

1 file changed

+44
-17
lines changed

.github/workflows/supabase_flutter.yml

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ permissions:
3232

3333
jobs:
3434
test:
35-
name: Test Flutter v${{ matrix.flutter-version }}
35+
name: Test Flutter v${{ matrix.flutter-version }} on ${{ matrix.os }}
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
os: [ubuntu-latest]
39+
os: [ubuntu-latest, macos-latest, windows-latest]
4040
flutter-version: ['3.19.x', '3.x']
4141

4242
defaults:
@@ -46,47 +46,74 @@ jobs:
4646
runs-on: ${{ matrix.os }}
4747

4848
steps:
49-
- name: Checks-out repo
49+
- name: Checkout repository
5050
uses: actions/checkout@v4
5151

52-
- uses: subosito/flutter-action@v2
52+
- name: Setup Flutter
53+
uses: subosito/flutter-action@v2
5354
with:
5455
flutter-version: ${{ matrix.flutter-version }}
5556
channel: 'stable'
5657

57-
- run: flutter --version
58+
- name: Show Flutter version
59+
run: flutter --version
5860

5961
- name: Bootstrap workspace
6062
run: |
6163
cd ../../
6264
dart pub global activate melos
6365
melos bootstrap
6466
65-
- name: flutterfmt
67+
- name: Run formatter
6668
if: ${{ matrix.flutter-version == '3.x'}}
6769
run: dart format lib test -l 80 --set-exit-if-changed
6870

69-
- name: analyzer
71+
- name: Run analyzer
7072
if: ${{ matrix.flutter-version == '3.x'}}
7173
run: flutter analyze --fatal-warnings --fatal-infos .
7274

73-
- name: Run tests
75+
- name: Run unit tests
7476
run: flutter test --concurrency=1
7577

76-
- name: Run tests on chrome with js
78+
- name: Run tests with downgraded app_links
79+
run: |
80+
flutter pub downgrade app_links
81+
flutter test --concurrency=1
82+
83+
- name: Build and test web (JS)
7784
if: ${{ matrix.flutter-version == '3.x'}}
78-
run: flutter test --platform chrome
85+
run: |
86+
cd example
87+
flutter test --platform chrome
88+
flutter build web
7989
80-
- name: Run tests on chrome with wasm
90+
- name: Build and test web (WASM)
8191
if: ${{ matrix.flutter-version == '3.x'}}
82-
run: flutter test --platform chrome --wasm
92+
run: |
93+
cd example
94+
flutter test --platform chrome --wasm
95+
flutter build web --wasm
8396
84-
- name: Run tests with downgraded app_links
97+
- name: Build macOS app
98+
if: ${{ matrix.os == 'macos-latest' }}
8599
run: |
86-
flutter pub downgrade app_links
87-
flutter test --concurrency=1
100+
cd example
101+
flutter build macos
102+
103+
- name: Build Windows app
104+
if: ${{ matrix.os == 'windows-latest' }}
105+
run: |
106+
cd example
107+
flutter build windows
108+
109+
- name: Build Linux app
110+
if: ${{ matrix.os == 'ubuntu-latest' }}
111+
run: |
112+
cd example
113+
flutter build linux
88114
89-
- name: Verify if Flutter web build is successful
115+
- name: Build iOS app
116+
if: ${{ matrix.os == 'macos-latest' }}
90117
run: |
91118
cd example
92-
flutter build web
119+
flutter build ios --no-codesign

0 commit comments

Comments
 (0)