@@ -5,8 +5,12 @@ name: build
55on :
66 push :
77 branches : [ develop, master ]
8+ paths :
9+ - ' flutter_cache_manager/**'
810 pull_request :
911 branches : [ develop ]
12+ paths :
13+ - ' flutter_cache_manager/**'
1014
1115# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1216jobs :
1620 # The type of runner that the job will run on
1721 runs-on : ubuntu-latest
1822
23+ env :
24+ source-directory : ./flutter_cache_manager
25+
1926 # Steps represent a sequence of tasks that will be executed as part of the job
2027 steps :
2128 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -29,17 +36,22 @@ jobs:
2936 # Download all Flutter packages
3037 - name : Download dependencies
3138 run : flutter pub get
39+ working-directory : ${{env.source-directory}}
3240
3341 # Run Flutter Format to ensure formatting is valid
3442 - name : Run Flutter Format
3543 run : flutter format --set-exit-if-changed .
44+ working-directory : ${{env.source-directory}}
3645
3746 analyze :
3847 name : Analyze
3948
4049 # The type of runner that the job will run on
4150 runs-on : ubuntu-latest
4251
52+ env :
53+ source-directory : ./flutter_cache_manager
54+
4355 # Steps represent a sequence of tasks that will be executed as part of the job
4456 steps :
4557 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -53,10 +65,12 @@ jobs:
5365 # Download all Flutter packages
5466 - name : Download dependencies
5567 run : flutter pub get
68+ working-directory : ${{env.source-directory}}
5669
5770 # Run Flutter Analyzer
5871 - name : Run Flutter Analyzer
5972 run : flutter analyze
73+ working-directory : ${{env.source-directory}}
6074
6175 build_android :
6276 name : Build Android App
6579 runs-on : ubuntu-latest
6680
6781 env :
68- example-directory : ./example
82+ source-directory : ./flutter_cache_manager
83+ example-directory : ./flutter_cache_manager/example
6984
7085 # Steps represent a sequence of tasks that will be executed as part of the job
7186 steps :
85100 # Download all Flutter packages
86101 - name : Download dependencies
87102 run : flutter pub get
103+ working-directory : ${{env.source-directory}}
88104
89105 # Build Android version of the example App
90106 - name : Run Android build
98114 runs-on : macos-latest
99115
100116 env :
101- example-directory : ./example
117+ source-directory : ./flutter_cache_manager
118+ example-directory : ./flutter_cache_manager/example
102119
103120 # Steps represent a sequence of tasks that will be executed as part of the job
104121 steps :
@@ -113,6 +130,7 @@ jobs:
113130 # Download all Flutter packages
114131 - name : Download dependencies
115132 run : flutter pub get
133+ working-directory : ${{env.source-directory}}
116134
117135 # Build iOS version of the example App
118136 - name : Run iOS build
@@ -126,7 +144,8 @@ jobs:
126144 runs-on : macos-latest
127145
128146 env :
129- example-directory : ./example
147+ source-directory : ./flutter_cache_manager
148+ example-directory : ./flutter_cache_manager/example
130149
131150 # Steps represent a sequence of tasks that will be executed as part of the job
132151 steps :
@@ -141,10 +160,12 @@ jobs:
141160 # Enable platform support
142161 - name : Enable macOS
143162 run : flutter config --enable-macos-desktop
163+ working-directory : ${{env.source-directory}}
144164
145165 # Download all Flutter packages
146166 - name : Download dependencies
147167 run : flutter pub get
168+ working-directory : ${{env.source-directory}}
148169
149170 # Build macOS version of the example App
150171 - name : Run macOS build
@@ -158,7 +179,8 @@ jobs:
158179 runs-on : windows-latest
159180
160181 env :
161- example-directory : ./example
182+ source-directory : ./flutter_cache_manager
183+ example-directory : ./flutter_cache_manager/example
162184
163185 # Steps represent a sequence of tasks that will be executed as part of the job
164186 steps :
@@ -173,10 +195,12 @@ jobs:
173195 # Enable platform support
174196 - name : Enable Windows
175197 run : flutter config --enable-windows-desktop
198+ working-directory : ${{env.source-directory}}
176199
177200 # Download all Flutter packages
178201 - name : Download dependencies
179202 run : flutter pub get
203+ working-directory : ${{env.source-directory}}
180204
181205 # Build iOS version of the example App
182206 - name : Run Windows build
@@ -190,7 +214,8 @@ jobs:
190214 runs-on : ubuntu-latest
191215
192216 env :
193- example-directory : ./example
217+ source-directory : ./flutter_cache_manager
218+ example-directory : ./flutter_cache_manager/example
194219
195220 # Steps represent a sequence of tasks that will be executed as part of the job
196221 steps :
@@ -209,14 +234,17 @@ jobs:
209234 # Enable platform support
210235 - name : Enable Linux
211236 run : flutter config --enable-linux-desktop
237+ working-directory : ${{env.source-directory}}
212238
213239 # Enable platform support
214240 - name : Flutter Doctor
215241 run : flutter doctor
242+ working-directory : ${{env.source-directory}}
216243
217244 # Download all Flutter packages
218245 - name : Download dependencies
219246 run : flutter pub get
247+ working-directory : ${{env.source-directory}}
220248
221249 # Build iOS version of the example App
222250 - name : Run Linux build
@@ -230,7 +258,8 @@ jobs:
230258 runs-on : ubuntu-latest
231259
232260 env :
233- example-directory : ./example
261+ source-directory : ./flutter_cache_manager
262+ example-directory : ./flutter_cache_manager/example
234263
235264 # Steps represent a sequence of tasks that will be executed as part of the job
236265 steps :
@@ -245,6 +274,7 @@ jobs:
245274 # Download all Flutter packages
246275 - name : Download dependencies
247276 run : flutter pub get
277+ working-directory : ${{env.source-directory}}
248278
249279 # Build Web version of the example App
250280 - name : Run Web build
@@ -256,6 +286,9 @@ jobs:
256286 # The type of runner that the job will run on
257287 runs-on : ubuntu-latest
258288
289+ env :
290+ source-directory : ./flutter_cache_manager
291+
259292 # Steps represent a sequence of tasks that will be executed as part of the job
260293 steps :
261294 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -269,14 +302,16 @@ jobs:
269302 # Download all Flutter packages
270303 - name : Download dependencies
271304 run : flutter pub get
305+ working-directory : ${{env.source-directory}}
272306
273307 # Run all unit-tests with code coverage
274308 - name : Run unit tests
275309 run : flutter test --coverage
310+ working-directory : ${{env.source-directory}}
276311
277312 # Upload code coverage information
278313 - uses : codecov/codecov-action@v1
279314 with :
280- file : . /coverage/lcov.info # optional
315+ file : ${{env.source-directory}} /coverage/lcov.info # optional
281316 name : CacheManager # optional
282317 fail_ci_if_error : true
0 commit comments