@@ -32,11 +32,11 @@ permissions:
32
32
33
33
jobs :
34
34
test :
35
- name : Test Flutter v${{ matrix.flutter-version }}
35
+ name : Test Flutter v${{ matrix.flutter-version }} on ${{ matrix.os }}
36
36
strategy :
37
37
fail-fast : false
38
38
matrix :
39
- os : [ubuntu-latest]
39
+ os : [ubuntu-latest, macos-latest, windows-latest ]
40
40
flutter-version : ['3.19.x', '3.x']
41
41
42
42
defaults :
@@ -46,47 +46,74 @@ jobs:
46
46
runs-on : ${{ matrix.os }}
47
47
48
48
steps :
49
- - name : Checks-out repo
49
+ - name : Checkout repository
50
50
uses : actions/checkout@v4
51
51
52
- - uses : subosito/flutter-action@v2
52
+ - name : Setup Flutter
53
+ uses : subosito/flutter-action@v2
53
54
with :
54
55
flutter-version : ${{ matrix.flutter-version }}
55
56
channel : ' stable'
56
57
57
- - run : flutter --version
58
+ - name : Show Flutter version
59
+ run : flutter --version
58
60
59
61
- name : Bootstrap workspace
60
62
run : |
61
63
cd ../../
62
64
dart pub global activate melos
63
65
melos bootstrap
64
66
65
- - name : flutterfmt
67
+ - name : Run formatter
66
68
if : ${{ matrix.flutter-version == '3.x'}}
67
69
run : dart format lib test -l 80 --set-exit-if-changed
68
70
69
- - name : analyzer
71
+ - name : Run analyzer
70
72
if : ${{ matrix.flutter-version == '3.x'}}
71
73
run : flutter analyze --fatal-warnings --fatal-infos .
72
74
73
- - name : Run tests
75
+ - name : Run unit tests
74
76
run : flutter test --concurrency=1
75
77
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)
77
84
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
79
89
80
- - name : Run tests on chrome with wasm
90
+ - name : Build and test web (WASM)
81
91
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
83
96
84
- - name : Run tests with downgraded app_links
97
+ - name : Build macOS app
98
+ if : ${{ matrix.os == 'macos-latest' }}
85
99
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
88
114
89
- - name : Verify if Flutter web build is successful
115
+ - name : Build iOS app
116
+ if : ${{ matrix.os == 'macos-latest' }}
90
117
run : |
91
118
cd example
92
- flutter build web
119
+ flutter build ios --no-codesign
0 commit comments