-
-
Notifications
You must be signed in to change notification settings - Fork 284
130 lines (108 loc) · 3.67 KB
/
supabase_flutter.yml
File metadata and controls
130 lines (108 loc) · 3.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: supabase_flutter
on:
push:
branches:
- main
paths:
- 'packages/supabase_flutter/**'
- '.github/workflows/supabase_flutter.yml'
- 'packages/functions_client/**'
- 'packages/gotrue/**'
- 'packages/postgrest/**'
- 'packages/realtime_client/**'
- 'packages/storage_client/**'
- 'packages/supabase/**'
- 'packages/yet_another_json_isolate/**'
pull_request:
paths:
- 'packages/supabase_flutter/**'
- '.github/workflows/supabase_flutter.yml'
- 'packages/functions_client/**'
- 'packages/gotrue/**'
- 'packages/postgrest/**'
- 'packages/realtime_client/**'
- 'packages/storage_client/**'
- 'packages/supabase/**'
- 'packages/yet_another_json_isolate/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
name: Test Flutter v${{ matrix.flutter-version }} on ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
flutter-version: ['3.19.x', '3.x']
defaults:
run:
working-directory: packages/supabase_flutter
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
channel: 'stable'
cache: true
- name: Show Flutter version
run: flutter --version
- name: Bootstrap workspace
run: |
cd ../../
dart pub global activate melos
melos bootstrap
- name: Run formatter
if: ${{ matrix.flutter-version == '3.x'}}
run: dart format lib test -l 80 --set-exit-if-changed
- name: Run analyzer
if: ${{ matrix.flutter-version == '3.x'}}
run: flutter analyze --fatal-warnings .
- name: Run unit tests
run: flutter test --concurrency=1
- name: Build and test web (JS)
if: ${{ matrix.os == 'ubuntu-latest' && matrix.flutter-version == '3.x'}}
run: |
flutter test --platform chrome
cd example && flutter build web
- name: Build and test web (WASM)
# WASM tests have known infrastructure flakiness (12min+ loading timeouts)
# Allow CI to continue while still running tests for visibility
continue-on-error: true
if: ${{ matrix.os == 'ubuntu-latest' && matrix.flutter-version == '3.x'}}
run: |
flutter test --platform chrome --wasm
cd example && flutter build web --wasm
- name: Build macOS app
if: ${{ matrix.os == 'macos-latest' && matrix.flutter-version == '3.x'}}
run: |
cd example
flutter build macos
- name: Build Windows app
if: ${{ matrix.os == 'windows-latest' && matrix.flutter-version == '3.x'}}
run: |
cd example
flutter build windows
- name: Build Linux app
if: ${{ matrix.os == 'ubuntu-latest' && matrix.flutter-version == '3.x'}}
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libblkid-dev liblzma-dev
cd example
flutter build linux
- name: Build iOS app
if: ${{ matrix.os == 'macos-latest' && matrix.flutter-version == '3.x'}}
run: |
cd example
flutter build ios --no-codesign
- name: Build Android app
if: ${{ matrix.os == 'ubuntu-latest' && matrix.flutter-version == '3.x'}}
run: |
cd example
flutter build apk