@@ -4,13 +4,15 @@ name: build
4
4
# events but only for the develop branch
5
5
on :
6
6
push :
7
- branches : [ develop, master ]
7
+ branches : [develop, main ]
8
8
paths :
9
- - ' flutter_cache_manager/**'
9
+ - " flutter_cache_manager/**"
10
+ - " .github/workflows/**"
10
11
pull_request :
11
- branches : [ develop ]
12
+ branches : [develop]
12
13
paths :
13
- - ' flutter_cache_manager/**'
14
+ - " flutter_cache_manager/**"
15
+ - " .github/workflows/**"
14
16
15
17
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
16
18
jobs :
@@ -26,12 +28,15 @@ jobs:
26
28
# Steps represent a sequence of tasks that will be executed as part of the job
27
29
steps :
28
30
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29
- - uses : actions/checkout@v2
31
+ - uses : actions/checkout@v4
30
32
31
33
# Make sure the stable version of Flutter is available
32
- - uses : subosito/flutter-action@v1
34
+ - name : Set up Flutter
35
+ uses : subosito/flutter-action@v2
33
36
with :
34
- channel : ' stable'
37
+ channel : " stable"
38
+ architecture : x64
39
+ cache : true
35
40
36
41
# Download all Flutter packages
37
42
- name : Download dependencies
40
45
41
46
# Run Flutter Format to ensure formatting is valid
42
47
- name : Run Flutter Format
43
- run : flutter format --set-exit-if-changed .
48
+ run : dart format --set-exit-if-changed .
44
49
working-directory : ${{env.source-directory}}
45
50
46
51
analyze :
@@ -55,12 +60,15 @@ jobs:
55
60
# Steps represent a sequence of tasks that will be executed as part of the job
56
61
steps :
57
62
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
58
- - uses : actions/checkout@v2
63
+ - uses : actions/checkout@v4
59
64
60
65
# Make sure the stable version of Flutter is available
61
- - uses : subosito/flutter-action@v1
66
+ - name : Set up Flutter
67
+ uses : subosito/flutter-action@v2
62
68
with :
63
- channel : ' stable'
69
+ channel : " stable"
70
+ architecture : x64
71
+ cache : true
64
72
65
73
# Download all Flutter packages
66
74
- name : Download dependencies
@@ -85,17 +93,21 @@ jobs:
85
93
# Steps represent a sequence of tasks that will be executed as part of the job
86
94
steps :
87
95
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
88
- - uses : actions/checkout@v2
96
+ - uses : actions/checkout@v4
89
97
90
98
# Ensure correct JAVA version is installed.
91
- - uses : actions/setup-java@v1
99
+ - uses : actions/setup-java@v4
92
100
with :
93
- java-version : ' 12.x'
101
+ distribution : " zulu"
102
+ java-version : " 17"
94
103
95
104
# Make sure the stable version of Flutter is available
96
- - uses : subosito/flutter-action@v1
105
+ - name : Set up Flutter
106
+ uses : subosito/flutter-action@v2
97
107
with :
98
- channel : ' stable'
108
+ channel : " stable"
109
+ architecture : x64
110
+ cache : true
99
111
100
112
# Download all Flutter packages
101
113
- name : Download dependencies
@@ -120,12 +132,15 @@ jobs:
120
132
# Steps represent a sequence of tasks that will be executed as part of the job
121
133
steps :
122
134
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
123
- - uses : actions/checkout@v2
135
+ - uses : actions/checkout@v4
124
136
125
137
# Make sure the stable version of Flutter is available
126
- - uses : subosito/flutter-action@v1
138
+ - name : Set up Flutter
139
+ uses : subosito/flutter-action@v2
127
140
with :
128
- channel : ' stable'
141
+ channel : " stable"
142
+ architecture : x64
143
+ cache : true
129
144
130
145
# Download all Flutter packages
131
146
- name : Download dependencies
@@ -150,12 +165,15 @@ jobs:
150
165
# Steps represent a sequence of tasks that will be executed as part of the job
151
166
steps :
152
167
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
153
- - uses : actions/checkout@v2
168
+ - uses : actions/checkout@v4
154
169
155
170
# Make sure the stable version of Flutter is available
156
- - uses : subosito/flutter-action@v1
171
+ - name : Set up Flutter
172
+ uses : subosito/flutter-action@v2
157
173
with :
158
- channel : ' stable'
174
+ channel : " stable"
175
+ architecture : x64
176
+ cache : true
159
177
160
178
# Enable platform support
161
179
- name : Enable macOS
@@ -185,12 +203,15 @@ jobs:
185
203
# Steps represent a sequence of tasks that will be executed as part of the job
186
204
steps :
187
205
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
188
- - uses : actions/checkout@v2
206
+ - uses : actions/checkout@v4
189
207
190
208
# Make sure the stable version of Flutter is available
191
- - uses : subosito/flutter-action@v1
209
+ - name : Set up Flutter
210
+ uses : subosito/flutter-action@v2
192
211
with :
193
- channel : ' stable'
212
+ channel : " stable"
213
+ architecture : x64
214
+ cache : true
194
215
195
216
# Enable platform support
196
217
- name : Enable Windows
@@ -224,12 +245,15 @@ jobs:
224
245
- run : sudo apt-get install -y ninja-build libgtk-3-dev libblkid-dev
225
246
226
247
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
227
- - uses : actions/checkout@v2
248
+ - uses : actions/checkout@v4
228
249
229
250
# Make sure the stable version of Flutter is available
230
- - uses : subosito/flutter-action@v1
251
+ - name : Set up Flutter
252
+ uses : subosito/flutter-action@v2
231
253
with :
232
- channel : ' stable'
254
+ channel : " stable"
255
+ architecture : x64
256
+ cache : true
233
257
234
258
# Enable platform support
235
259
- name : Enable Linux
@@ -264,12 +288,15 @@ jobs:
264
288
# Steps represent a sequence of tasks that will be executed as part of the job
265
289
steps :
266
290
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
267
- - uses : actions/checkout@v2
291
+ - uses : actions/checkout@v4
268
292
269
293
# Make sure the stable version of Flutter is available
270
- - uses : subosito/flutter-action@v1
294
+ - name : Set up Flutter
295
+ uses : subosito/flutter-action@v2
271
296
with :
272
- channel : ' stable'
297
+ channel : " stable"
298
+ architecture : x64
299
+ cache : true
273
300
274
301
# Download all Flutter packages
275
302
- name : Download dependencies
@@ -292,12 +319,15 @@ jobs:
292
319
# Steps represent a sequence of tasks that will be executed as part of the job
293
320
steps :
294
321
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
295
- - uses : actions/checkout@v2
322
+ - uses : actions/checkout@v4
296
323
297
324
# Make sure the stable version of Flutter is available
298
- - uses : subosito/flutter-action@v1
325
+ - name : Set up Flutter
326
+ uses : subosito/flutter-action@v2
299
327
with :
300
- channel : ' stable'
328
+ channel : " stable"
329
+ architecture : x64
330
+ cache : true
301
331
302
332
# Download all Flutter packages
303
333
- name : Download dependencies
@@ -309,9 +339,11 @@ jobs:
309
339
run : flutter test --coverage
310
340
working-directory : ${{env.source-directory}}
311
341
312
- # Upload code coverage information
313
- - uses : codecov/codecov-action@v1
314
- with :
315
- file : ${{env.source-directory}}/coverage/lcov.info # optional
316
- name : CacheManager # optional
317
- fail_ci_if_error : true
342
+ # # Upload code coverage information
343
+ # - uses: codecov/codecov-action@v4
344
+ # env:
345
+ # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
346
+ # with:
347
+ # files: ${{env.source-directory}}/coverage/lcov.info
348
+ # name: CacheManager
349
+ # fail_ci_if_error: true
0 commit comments