1313# limitations under the License.
1414
1515name : Build
16+ permissions :
17+ contents : read
1618
1719on :
1820 push :
19- branches : [ main ]
21+ branches : [main]
2022 pull_request :
21- branches : [ main ]
23+ branches : [main]
2224
2325jobs :
24- dart-format-and-analyze- check :
25- name : Dart Format/Analyze/Test Check
26+ dart-format-check :
27+ name : Dart Format Check
2628 runs-on : ubuntu-latest
2729
2830 steps :
29- - uses : actions/checkout@v2
30- - uses : actions/setup-java@v1
31- with :
32- java-version : ' 17.x'
33- - uses : actions/checkout@v2
34- - uses : subosito/flutter-action@v2
35- with :
36- channel : ' stable'
37- - name : Install project dependencies
38- run : flutter pub get
31+ - name : Clone repository
32+ uses : actions/checkout@v4
33+ - uses : ./.github/actions/setup-flutter
3934 - name : Dart Format Check
40- run : dart format lib/ test/ --set-exit-if-changed
35+ run : dart format . --set-exit-if-changed
36+
37+ import-sorter-check :
38+ name : Import Sorter Check
39+ runs-on : ubuntu-latest
40+
41+ steps :
42+ - name : Clone repository
43+ uses : actions/checkout@v4
44+ - uses : ./.github/actions/setup-flutter
4145 - name : Import Sorter Check
4246 run : dart run import_sorter:main --no-comments --exit-if-changed
47+
48+ version-consistency-check :
49+ name : Version Consistency Check
50+ runs-on : ubuntu-latest
51+
52+ steps :
53+ - name : Clone repository
54+ uses : actions/checkout@v4
55+ - uses : ./.github/actions/setup-flutter
4356 - name : Check version consistency
4457 run : dart run scripts/check_version.dart
58+
59+ dart-analyze-check :
60+ name : Dart Analyze Check
61+ runs-on : ubuntu-latest
62+
63+ steps :
64+ - name : Clone repository
65+ uses : actions/checkout@v4
66+ - uses : ./.github/actions/setup-flutter
4567 - name : Dart Analyze Check
4668 run : flutter analyze
69+
70+ dart-test-check :
71+ name : Dart Test Check
72+ runs-on : ubuntu-latest
73+
74+ steps :
75+ - name : Clone repository
76+ uses : actions/checkout@v4
77+ - uses : ./.github/actions/setup-flutter
4778 - name : Dart Test Check
4879 run : flutter test
4980
@@ -52,16 +83,11 @@ jobs:
5283 runs-on : ubuntu-latest
5384
5485 steps :
55- - uses : actions/checkout@v2
56- - uses : actions/setup-java@v1
57- with :
58- java-version : ' 17.x'
59- - uses : actions/checkout@v2
60- - uses : subosito/flutter-action@v2
86+ - name : Clone repository
87+ uses : actions/checkout@v4
88+ - uses : ./.github/actions/setup-flutter
6189 with :
62- channel : ' stable'
63- - name : Install project dependencies
64- run : flutter pub get
90+ java-version : " 17.x"
6591 - name : Build for Android
6692 working-directory : ./example
6793 run : flutter build apk
7197 runs-on : macos-latest
7298
7399 steps :
74- - uses : actions/checkout@v2
75- - uses : subosito/flutter-action@v2
76- with :
77- channel : ' stable'
78- - name : Install project dependencies
79- run : flutter pub get
100+ - name : Clone repository
101+ uses : actions/checkout@v4
102+ - uses : ./.github/actions/setup-flutter
80103 - name : Install xcode platform support for iOS
81104 run : xcodebuild -downloadPlatform iOS
82105 - name : Build for iOS
@@ -88,12 +111,9 @@ jobs:
88111 runs-on : windows-latest
89112
90113 steps :
91- - uses : actions/checkout@v2
92- - uses : subosito/flutter-action@v1
93- with :
94- channel : ' stable'
95- - name : Install project dependencies
96- run : flutter pub get
114+ - name : Clone repository
115+ uses : actions/checkout@v4
116+ - uses : ./.github/actions/setup-flutter
97117 - name : Build for Windows
98118 working-directory : ./example
99119 run : flutter build windows --release
@@ -103,12 +123,9 @@ jobs:
103123 runs-on : macos-latest
104124
105125 steps :
106- - uses : actions/checkout@v2
107- - uses : subosito/flutter-action@v1
108- with :
109- channel : ' stable'
110- - name : Install project dependencies
111- run : flutter pub get
126+ - name : Clone repository
127+ uses : actions/checkout@v4
128+ - uses : ./.github/actions/setup-flutter
112129 - name : Build for macOS
113130 working-directory : ./example
114131 run : flutter build macos --release
@@ -118,16 +135,11 @@ jobs:
118135 runs-on : ubuntu-latest
119136
120137 steps :
121- - uses : actions/checkout@v2
122- - uses : actions/setup-java@v1
138+ - name : Clone repository
139+ uses : actions/checkout@v4
140+ - uses : ./.github/actions/setup-flutter
123141 with :
124- java-version : ' 12.x'
125- - uses : actions/checkout@v2
126- - uses : subosito/flutter-action@v2
127- with :
128- channel : ' stable'
129- - name : Install project dependencies
130- run : flutter pub get
142+ java-version : " 17.x"
131143 - name : Run apt update
132144 run : sudo apt-get update
133145 - name : Install ninja-build libgtk-3-dev
@@ -141,16 +153,11 @@ jobs:
141153 runs-on : ubuntu-latest
142154
143155 steps :
144- - uses : actions/checkout@v2
145- - uses : actions/setup-java@v1
146- with :
147- java-version : ' 12.x'
148- - uses : actions/checkout@v2
149- - uses : subosito/flutter-action@v2
156+ - name : Clone repository
157+ uses : actions/checkout@v4
158+ - uses : ./.github/actions/setup-flutter
150159 with :
151- channel : ' stable'
152- - name : Install project dependencies
153- run : flutter pub get
160+ java-version : " 17.x"
154161 - name : Build for Web
155162 working-directory : ./example
156163 run : flutter build web
@@ -160,16 +167,11 @@ jobs:
160167 runs-on : ubuntu-latest
161168
162169 steps :
163- - uses : actions/checkout@v2
164- - uses : actions/setup-java@v1
165- with :
166- java-version : ' 12.x'
167- - uses : actions/checkout@v2
168- - uses : subosito/flutter-action@v2
170+ - name : Clone repository
171+ uses : actions/checkout@v4
172+ - uses : ./.github/actions/setup-flutter
169173 with :
170- channel : ' stable'
171- - name : Install project dependencies
172- run : flutter pub get
174+ java-version : " 17.x"
173175 - name : Build for Web
174176 working-directory : ./example
175177 run : flutter build web --wasm
0 commit comments