Skip to content

Commit 39ebacb

Browse files
authored
Merge pull request #627 from Baseflow/feature/github-ci
add workflow doc
2 parents 2a5b155 + f1572e0 commit 39ebacb

File tree

1 file changed

+203
-0
lines changed

1 file changed

+203
-0
lines changed
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
name: app_facing_package
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 ]
8+
paths:
9+
- 'cached_network_image/**'
10+
pull_request:
11+
branches: [ develop ]
12+
paths:
13+
- 'cached_network_image/**'
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
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
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+
build_android:
76+
name: Build Android App
77+
78+
# The type of runner that the job will run on
79+
runs-on: ubuntu-latest
80+
81+
env:
82+
source-directory: ./cached_network_image
83+
example-directory: ./cached_network_image/example
84+
85+
# Steps represent a sequence of tasks that will be executed as part of the job
86+
steps:
87+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
88+
- uses: actions/checkout@v2
89+
90+
# Ensure correct JAVA version is installed.
91+
- uses: actions/setup-java@v1
92+
with:
93+
java-version: '12.x'
94+
95+
# Make sure the stable version of Flutter is available
96+
- uses: subosito/flutter-action@v1
97+
with:
98+
channel: 'stable'
99+
100+
# Download all Flutter packages
101+
- name: Download dependencies
102+
run: flutter pub get
103+
working-directory: ${{env.source-directory}}
104+
105+
# Build Android version of the example App
106+
- name: Run Android build
107+
run: flutter build apk --release
108+
working-directory: ${{env.example-directory}}
109+
110+
build_ios:
111+
name: Build iOS App
112+
113+
# The type of runner that the job will run on
114+
runs-on: macos-latest
115+
116+
env:
117+
source-directory: ./cached_network_image
118+
example-directory: ./cached_network_image/example
119+
120+
# Steps represent a sequence of tasks that will be executed as part of the job
121+
steps:
122+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
123+
- uses: actions/checkout@v2
124+
125+
# Make sure the stable version of Flutter is available
126+
- uses: subosito/flutter-action@v1
127+
with:
128+
channel: 'stable'
129+
130+
# Download all Flutter packages
131+
- name: Download dependencies
132+
run: flutter pub get
133+
working-directory: ${{env.source-directory}}
134+
135+
# Build iOS version of the example App
136+
- name: Run iOS build
137+
run: flutter build ios --release --no-codesign
138+
working-directory: ${{env.example-directory}}
139+
140+
build_web:
141+
name: Build Web App
142+
143+
# The type of runner that the job will run on
144+
runs-on: ubuntu-latest
145+
146+
env:
147+
source-directory: ./cached_network_image
148+
example-directory: ./cached_network_image/example
149+
150+
# Steps represent a sequence of tasks that will be executed as part of the job
151+
steps:
152+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
153+
- uses: actions/checkout@v2
154+
155+
# Make sure the stable version of Flutter is available
156+
- uses: subosito/flutter-action@v1
157+
with:
158+
channel: 'stable'
159+
160+
# Download all Flutter packages
161+
- name: Download dependencies
162+
run: flutter pub get
163+
working-directory: ${{env.source-directory}}
164+
165+
# Build Web version of the example App
166+
- name: Run Web build
167+
run: flutter build web --release
168+
working-directory: ${{env.example-directory}}
169+
170+
tests:
171+
name: Unit-tests
172+
# The type of runner that the job will run on
173+
runs-on: ubuntu-latest
174+
175+
env:
176+
source-directory: ./cached_network_image
177+
178+
# Steps represent a sequence of tasks that will be executed as part of the job
179+
steps:
180+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
181+
- uses: actions/checkout@v2
182+
183+
# Make sure the stable version of Flutter is available
184+
- uses: subosito/flutter-action@v1
185+
with:
186+
channel: 'stable'
187+
188+
# Download all Flutter packages
189+
- name: Download dependencies
190+
run: flutter pub get
191+
working-directory: ${{env.source-directory}}
192+
193+
# Run all unit-tests with code coverage
194+
- name: Run unit tests
195+
run: flutter test --coverage
196+
working-directory: ${{env.source-directory}}
197+
198+
# Upload code coverage information
199+
- uses: codecov/codecov-action@v1
200+
with:
201+
file: ${{env.source-directory}}/coverage/lcov.info # optional
202+
name: CachedNetworkImage (App Facing Package) # optional
203+
fail_ci_if_error: true

0 commit comments

Comments
 (0)