Skip to content

Commit 2f2b76b

Browse files
authored
Migrated to the federated architecture (Baseflow#127)
* Migrated the geocoding to a federated plugin * Updated the changelog * Updated the tests for the new packages * Removed unnecessary .gitignore files and moved the analysis options file * Revert the changes to the geocoding main plugin * Remove some more .gitignore files which * Add newlines at the end of files * Fixed two imports in the example apps * Add workflows for the new android/ios projects * Removed specific versions for the example android app, updated the build workflow * Updated the branches for which we execute the workflows
1 parent 5379fff commit 2f2b76b

File tree

121 files changed

+4216
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+4216
-23
lines changed

.github/workflows/app_facing_package.yaml

+115-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is a basic workflow to help you get started with Actions
22

3-
name: app_facing_package
3+
name: geocoding
44

55
# Controls when the action will run. Triggers the workflow on push or pull request
66
# events but only for the develop branch
@@ -16,21 +16,22 @@ on:
1616

1717
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1818
jobs:
19-
# Job configuration for the geocoding (App Facing Package)
20-
geocoding:
19+
format:
20+
name: Format
21+
2122
# The type of runner that the job will run on
22-
runs-on: macos-latest
23+
runs-on: ubuntu-latest
24+
2325
env:
2426
source-directory: ./geocoding
25-
example-directory: ./geocoding/example
2627

2728
# Steps represent a sequence of tasks that will be executed as part of the job
2829
steps:
2930
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
30-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
3132

3233
# Make sure the stable version of Flutter is available
33-
- uses: subosito/flutter-action@v1
34+
- uses: subosito/flutter-action@v2
3435
with:
3536
channel: 'stable'
3637

@@ -43,22 +44,124 @@ jobs:
4344
- name: Run Flutter Format
4445
run: flutter format --set-exit-if-changed .
4546
working-directory: ${{env.source-directory}}
46-
47+
48+
analyze:
49+
name: Analyze
50+
51+
# The type of runner that the job will run on
52+
runs-on: ubuntu-latest
53+
54+
env:
55+
source-directory: ./geocoding
56+
57+
# Steps represent a sequence of tasks that will be executed as part of the job
58+
steps:
59+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
60+
- uses: actions/checkout@v3
61+
62+
# Make sure the stable version of Flutter is available
63+
- uses: subosito/flutter-action@v2
64+
with:
65+
channel: 'stable'
66+
67+
# Download all Flutter packages
68+
- name: Download dependencies
69+
run: flutter pub get
70+
working-directory: ${{env.source-directory}}
71+
4772
# Run Flutter Analyzer
4873
- name: Run Flutter Analyzer
4974
run: flutter analyze
5075
working-directory: ${{env.source-directory}}
51-
52-
# Build Android version of the example app
76+
77+
build_android:
78+
name: Build Android App
79+
80+
# The type of runner that the job will run on
81+
runs-on: ubuntu-latest
82+
83+
env:
84+
source-directory: ./geocoding
85+
example-directory: ./geocoding/example
86+
87+
# Steps represent a sequence of tasks that will be executed as part of the job
88+
steps:
89+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
90+
- uses: actions/checkout@v3
91+
92+
# Ensure correct JAVA version is installed.
93+
- uses: actions/setup-java@v1
94+
with:
95+
java-version: '12.x'
96+
97+
# Make sure the stable version of Flutter is available
98+
- uses: subosito/flutter-action@v2
99+
with:
100+
channel: 'stable'
101+
102+
# Download all Flutter packages
103+
- name: Download dependencies
104+
run: flutter pub get
105+
working-directory: ${{env.source-directory}}
106+
107+
# Build Android version of the example App
53108
- name: Run Android build
54109
run: flutter build apk --release
55110
working-directory: ${{env.example-directory}}
56-
57-
# Build iOS version of the example app
111+
112+
build_ios:
113+
name: Build iOS App
114+
115+
# The type of runner that the job will run on
116+
runs-on: macos-latest
117+
118+
env:
119+
source-directory: ./geocoding
120+
example-directory: ./geocoding/example
121+
122+
# Steps represent a sequence of tasks that will be executed as part of the job
123+
steps:
124+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
125+
- uses: actions/checkout@v3
126+
127+
# Make sure the stable version of Flutter is available
128+
- uses: subosito/flutter-action@v2
129+
with:
130+
channel: 'stable'
131+
132+
# Download all Flutter packages
133+
- name: Download dependencies
134+
run: flutter pub get
135+
working-directory: ${{env.source-directory}}
136+
137+
# Build iOS version of the example App
58138
- name: Run iOS build
59139
run: flutter build ios --release --no-codesign
60140
working-directory: ${{env.example-directory}}
61141

142+
tests:
143+
name: Unit-tests
144+
# The type of runner that the job will run on
145+
runs-on: ubuntu-latest
146+
147+
env:
148+
source-directory: ./geocoding
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@v3
154+
155+
# Make sure the stable version of Flutter is available
156+
- uses: subosito/flutter-action@v2
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+
62165
# Run all unit-tests with code coverage
63166
- name: Run unit tests
64167
run: flutter test --coverage
+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: geocoding_android
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the develop branch
7+
on:
8+
push:
9+
branches: [ master, develop ]
10+
paths:
11+
- 'geocoding_android/**'
12+
pull_request:
13+
branches: [ master, develop ]
14+
paths:
15+
- 'geocoding_android/**'
16+
17+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
18+
jobs:
19+
format:
20+
name: Format
21+
22+
# The type of runner that the job will run on
23+
runs-on: ubuntu-latest
24+
25+
env:
26+
source-directory: ./geocoding_android
27+
28+
# Steps represent a sequence of tasks that will be executed as part of the job
29+
steps:
30+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
31+
- uses: actions/checkout@v3
32+
33+
# Make sure the stable version of Flutter is available
34+
- uses: subosito/flutter-action@v2
35+
with:
36+
channel: 'stable'
37+
38+
# Download all Flutter packages
39+
- name: Download dependencies
40+
run: flutter pub get
41+
working-directory: ${{env.source-directory}}
42+
43+
# Run Flutter Format to ensure formatting is valid
44+
- name: Run Flutter Format
45+
run: flutter format --set-exit-if-changed .
46+
working-directory: ${{env.source-directory}}
47+
48+
analyze:
49+
name: Analyze
50+
51+
# The type of runner that the job will run on
52+
runs-on: ubuntu-latest
53+
54+
env:
55+
source-directory: ./geocoding_android
56+
57+
# Steps represent a sequence of tasks that will be executed as part of the job
58+
steps:
59+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
60+
- uses: actions/checkout@v3
61+
62+
# Make sure the stable version of Flutter is available
63+
- uses: subosito/flutter-action@v2
64+
with:
65+
channel: 'stable'
66+
67+
# Download all Flutter packages
68+
- name: Download dependencies
69+
run: flutter pub get
70+
working-directory: ${{env.source-directory}}
71+
72+
# Run Flutter Analyzer
73+
- name: Run Flutter Analyzer
74+
run: flutter analyze
75+
working-directory: ${{env.source-directory}}
76+
77+
build_android:
78+
name: Build Android App
79+
80+
# The type of runner that the job will run on
81+
runs-on: ubuntu-latest
82+
83+
env:
84+
source-directory: ./geocoding_android
85+
example-directory: ./geocoding_android/example
86+
87+
# Steps represent a sequence of tasks that will be executed as part of the job
88+
steps:
89+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
90+
- uses: actions/checkout@v3
91+
92+
# Ensure correct JAVA version is installed.
93+
- uses: actions/setup-java@v1
94+
with:
95+
java-version: '12.x'
96+
97+
# Make sure the stable version of Flutter is available
98+
- uses: subosito/flutter-action@v2
99+
with:
100+
channel: 'stable'
101+
102+
# Download all Flutter packages
103+
- name: Download dependencies
104+
run: flutter pub get
105+
working-directory: ${{env.source-directory}}
106+
107+
# Build Android version of the example App
108+
- name: Run Android build
109+
run: flutter build apk --release
110+
working-directory: ${{env.example-directory}}
111+
112+
tests:
113+
name: Unit-tests
114+
# The type of runner that the job will run on
115+
runs-on: ubuntu-latest
116+
117+
env:
118+
source-directory: ./geocoding_android
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@v3
124+
125+
# Make sure the stable version of Flutter is available
126+
- uses: subosito/flutter-action@v2
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+
# Run all unit-tests with code coverage
136+
- name: Run unit tests
137+
run: flutter test --coverage
138+
working-directory: ${{env.source-directory}}
139+
140+
# Upload code coverage information
141+
- uses: codecov/codecov-action@v1
142+
with:
143+
file: ${{env.source-directory}}/coverage/lcov.info # optional
144+
name: Geocoding Android # optional
145+
fail_ci_if_error: true

0 commit comments

Comments
 (0)