Skip to content

Commit 16f6c21

Browse files
mvanbeusekomclaude
andauthored
Align CI workflows with flutter-permission-handler (#330)
* Format sources with the current stable Dart formatter geocoding_darwin and geocoding_platform_interface no longer passed `dart format --set-exit-if-changed` with Flutter 3.47. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Align CI workflows with flutter-permission-handler Replace the per-package workflows with a single geocoding_ci.yaml entry point that uses dorny/paths-filter to check only the packages that changed, and a reusable geocoding_package.yaml that runs format, analyze, unit tests and the example build. A ci-result job always reports and is meant to be the only required status check. geocoding_darwin is now checked (the old geocoding_ios workflow pointed at a directory that no longer exists), building the example for iOS and macOS. Code coverage upload is not included and the Codecov badges are removed. README build badges point at the new workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent fb1ae78 commit 16f6c21

14 files changed

Lines changed: 883 additions & 764 deletions

File tree

‎.github/workflows/geocoding.yaml‎

Lines changed: 0 additions & 76 deletions
This file was deleted.

‎.github/workflows/geocoding_android.yaml‎

Lines changed: 0 additions & 66 deletions
This file was deleted.
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Geocoding - Continuous Integration
2+
3+
# Single entry point for CI. Every package is checked by the reusable
4+
# geocoding_package.yaml, and only when that package changed. Make `ci-result`
5+
# the only required status check: it reports on every run, also when the
6+
# package jobs are skipped.
7+
#
8+
# Starting it by hand runs every package, for example to check main against a
9+
# new Flutter stable release.
10+
on:
11+
push:
12+
branches: [main]
13+
pull_request:
14+
branches: [main]
15+
workflow_dispatch:
16+
17+
# A new push to a pull request cancels the run for the previous one. Every other
18+
# run gets a group of its own and is never cancelled, so every merged commit and
19+
# every manual run gets a result.
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
22+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
23+
24+
# The called workflow inherits these and can only narrow them. paths-filter
25+
# reads the changed files of a pull request through the API.
26+
permissions:
27+
contents: read
28+
pull-requests: read
29+
30+
jobs:
31+
changes:
32+
runs-on: ubuntu-latest
33+
outputs:
34+
android: ${{ steps.filter.outputs.android }}
35+
darwin: ${{ steps.filter.outputs.darwin }}
36+
platform_interface: ${{ steps.filter.outputs.platform_interface }}
37+
app_facing: ${{ steps.filter.outputs.app_facing }}
38+
steps:
39+
- uses: actions/checkout@v7
40+
- uses: dorny/paths-filter@v4
41+
id: filter
42+
if: github.event_name != 'workflow_dispatch'
43+
with:
44+
# The packages are not a pub workspace: each one resolves its
45+
# siblings from pub.dev, so a package only needs checking when its
46+
# own sources or the CI configuration changed.
47+
filters: |
48+
shared: &shared
49+
- '.github/workflows/geocoding_ci.yaml'
50+
- '.github/workflows/geocoding_package.yaml'
51+
platform_interface:
52+
- *shared
53+
- 'geocoding_platform_interface/**'
54+
android:
55+
- *shared
56+
- 'geocoding_android/**'
57+
darwin:
58+
- *shared
59+
- 'geocoding_darwin/**'
60+
app_facing:
61+
- *shared
62+
- 'geocoding/**'
63+
64+
platform_interface:
65+
needs: changes
66+
if: github.event_name == 'workflow_dispatch' || needs.changes.outputs.platform_interface == 'true'
67+
uses: ./.github/workflows/geocoding_package.yaml
68+
with:
69+
package: geocoding_platform_interface
70+
runs-on: ubuntu-latest
71+
unit-tests: true
72+
73+
android:
74+
needs: changes
75+
if: github.event_name == 'workflow_dispatch' || needs.changes.outputs.android == 'true'
76+
uses: ./.github/workflows/geocoding_package.yaml
77+
with:
78+
package: geocoding_android
79+
runs-on: ubuntu-latest
80+
java: true
81+
example-build: flutter build apk --release
82+
83+
# geocoding_darwin is the iOS and macOS implementation, so the example is
84+
# built for both.
85+
darwin:
86+
needs: changes
87+
if: github.event_name == 'workflow_dispatch' || needs.changes.outputs.darwin == 'true'
88+
uses: ./.github/workflows/geocoding_package.yaml
89+
with:
90+
package: geocoding_darwin
91+
runs-on: macos-latest
92+
example-build: |
93+
flutter build ios --no-codesign --release
94+
flutter build macos --release
95+
96+
app_facing:
97+
needs: changes
98+
if: github.event_name == 'workflow_dispatch' || needs.changes.outputs.app_facing == 'true'
99+
uses: ./.github/workflows/geocoding_package.yaml
100+
with:
101+
package: geocoding
102+
runs-on: macos-latest
103+
java: true
104+
unit-tests: true
105+
example-build: |
106+
flutter build apk --release
107+
flutter build ios --release --no-codesign
108+
109+
ci-result: # ← the only required check
110+
needs: [changes, platform_interface, android, darwin, app_facing]
111+
if: always()
112+
runs-on: ubuntu-latest
113+
steps:
114+
- run: |
115+
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
116+
exit 1
117+
fi

‎.github/workflows/geocoding_ios.yaml‎

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)