1
+ name : web
2
+
3
+ # Controls when the action will run. Triggers the workflow on push or pull request
4
+ # events but only for the develop branch
5
+ on :
6
+ push :
7
+ branches : [ develop, master ]
8
+ paths :
9
+ - ' cached_network_image_web/**'
10
+ pull_request :
11
+ branches : [ develop ]
12
+ paths :
13
+ - ' cached_network_image_web/**'
14
+
15
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
16
+ jobs :
17
+ format :
18
+ name : Format
19
+
20
+ # The type of runner that the job will run on
21
+ runs-on : ubuntu-latest
22
+
23
+ env :
24
+ source-directory : ./cached_network_image_web
25
+
26
+ # Steps represent a sequence of tasks that will be executed as part of the job
27
+ steps :
28
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29
+ - uses : actions/checkout@v2
30
+
31
+ # Make sure the stable version of Flutter is available
32
+ - uses : subosito/flutter-action@v1
33
+ with :
34
+ channel : ' stable'
35
+
36
+ # Download all Flutter packages
37
+ - name : Download dependencies
38
+ run : flutter pub get
39
+ working-directory : ${{env.source-directory}}
40
+
41
+ # Run Flutter Format to ensure formatting is valid
42
+ - name : Run Flutter Format
43
+ run : flutter format --set-exit-if-changed .
44
+ working-directory : ${{env.source-directory}}
45
+
46
+ analyze :
47
+ name : Analyze
48
+
49
+ # The type of runner that the job will run on
50
+ runs-on : ubuntu-latest
51
+
52
+ env :
53
+ source-directory : ./cached_network_image_web
54
+
55
+ # Steps represent a sequence of tasks that will be executed as part of the job
56
+ steps :
57
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
58
+ - uses : actions/checkout@v2
59
+
60
+ # Make sure the stable version of Flutter is available
61
+ - uses : subosito/flutter-action@v1
62
+ with :
63
+ channel : ' stable'
64
+
65
+ # Download all Flutter packages
66
+ - name : Download dependencies
67
+ run : flutter pub get
68
+ working-directory : ${{env.source-directory}}
69
+
70
+ # Run Flutter Analyzer
71
+ - name : Run Flutter Analyzer
72
+ run : flutter analyze
73
+ working-directory : ${{env.source-directory}}
74
+
75
+ tests :
76
+ name : Unit-tests
77
+ # The type of runner that the job will run on
78
+ runs-on : ubuntu-latest
79
+
80
+ env :
81
+ source-directory : ./cached_network_image_web
82
+
83
+ # Steps represent a sequence of tasks that will be executed as part of the job
84
+ steps :
85
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
86
+ - uses : actions/checkout@v2
87
+
88
+ # Make sure the stable version of Flutter is available
89
+ - uses : subosito/flutter-action@v1
90
+ with :
91
+ channel : ' stable'
92
+
93
+ # Download all Flutter packages
94
+ - name : Download dependencies
95
+ run : flutter pub get
96
+ working-directory : ${{env.source-directory}}
97
+
98
+ # Run all unit-tests with code coverage
99
+ - name : Run unit tests
100
+ run : flutter test --coverage
101
+ working-directory : ${{env.source-directory}}
102
+
103
+ # Upload code coverage information
104
+ - uses : codecov/codecov-action@v1
105
+ with :
106
+ file : ${{env.source-directory}}/coverage/lcov.info # optional
107
+ name : CachedNetworkImage (Web) # optional
108
+ fail_ci_if_error : true
0 commit comments