feat(ci): adopt shorebird_ci workflow w/ required aggregator (#359)
ci / ✅ Semantic Pull Request (push) Has been cancelled
ci / 🔤 Check Spelling (push) Has been cancelled
ci / 👀 Detect Changes (push) Has been cancelled
Shorebird CI / changes (push) Has been cancelled
Shorebird CI / CSpell (push) Has been cancelled
ci / 🦀 Build ${{ matrix.crate }} (${{ matrix.os }}) (push) Has been cancelled
ci / 🎯 Build ${{ matrix.package }} (push) Has been cancelled
ci / ci (push) Has been cancelled
Shorebird CI / shorebird_code_push (push) Has been cancelled
Shorebird CI / shorebird_code_push_example (push) Has been cancelled
Shorebird CI / required (push) Has been cancelled

* feat(ci): add shorebird_ci-generated workflow w/ required aggregator

Generated w/ `shorebird_ci generate --style static --required`. Covers
the `shorebird_code_push` Dart package; Rust crates remain on main.yaml.

* fix(ci): add dorny, felangel, subpackages to cspell dictionary
This commit is contained in:
nickshorebird
2026-05-27 09:29:00 -04:00
committed by GitHub
parent fe3733374c
commit a591b7f6b9
3 changed files with 170 additions and 0 deletions
@@ -0,0 +1,74 @@
# Generated by shorebird_ci --style static. Safe to edit.
# Reusable workflow: CI steps for a single Flutter package.
on:
workflow_call:
inputs:
package_name:
required: true
type: string
package_path:
required: true
type: string
flutter_version:
required: false
default: ""
type: string
has_bloc_lint:
required: false
default: false
type: boolean
has_integration_tests:
required: false
default: false
type: boolean
has_unit_tests:
required: false
default: true
type: boolean
subpackages:
required: false
default: ""
type: string
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version || '' }}
channel: ${{ inputs.flutter_version && '' || 'stable' }}
- name: Setup Bloc Tools
if: inputs.has_bloc_lint
uses: felangel/setup-bloc-tools@v0
- name: Install Dependencies
working-directory: ${{ inputs.package_path }}
run: |
flutter pub get --no-example
for sub in ${{ inputs.subpackages }}; do
flutter pub get --no-example -C $sub
done
- working-directory: ${{ inputs.package_path }}
run: dart format --set-exit-if-changed .
- working-directory: ${{ inputs.package_path }}
run: flutter analyze .
- name: Bloc Lint
if: inputs.has_bloc_lint
working-directory: ${{ inputs.package_path }}
run: bloc lint .
- if: inputs.has_unit_tests
working-directory: ${{ inputs.package_path }}
run: flutter test --coverage
- if: inputs.has_unit_tests
uses: codecov/codecov-action@v6
with:
flags: ${{ inputs.package_name }}
working-directory: ${{ inputs.package_path }}
- name: Integration Tests
if: inputs.has_integration_tests
working-directory: ${{ inputs.package_path }}
run: flutter test integration_test
+93
View File
@@ -0,0 +1,93 @@
# Generated by shorebird_ci --style static. Safe to edit.
# Run `shorebird_ci verify` to check for dep graph drift.
name: Shorebird CI
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
changes:
runs-on: ubuntu-latest
outputs:
shorebird_code_push: ${{ steps.filter.outputs.shorebird_code_push }}
shorebird_code_push_example: ${{ steps.filter.outputs.shorebird_code_push_example }}
steps:
- uses: actions/checkout@v6
with:
# Full history so dorny/paths-filter can diff on push events.
fetch-depth: 0
- uses: dart-lang/setup-dart@v1
- run: dart pub global activate shorebird_ci
- name: Verify CI coverage
run: shorebird_ci verify
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
shorebird_code_push:
- shorebird_code_push/**
shorebird_code_push_example:
- shorebird_code_push/**
- shorebird_code_push/example/**
shorebird_code_push:
needs: changes
if: needs.changes.outputs.shorebird_code_push == 'true'
uses: ./.github/workflows/_shorebird_ci_flutter.yaml
with:
package_name: shorebird_code_push
package_path: shorebird_code_push
has_bloc_lint: false
has_unit_tests: true
subpackages: "example"
flutter_version: ""
has_integration_tests: false
shorebird_code_push_example:
needs: changes
if: needs.changes.outputs.shorebird_code_push_example == 'true'
uses: ./.github/workflows/_shorebird_ci_flutter.yaml
with:
package_name: shorebird_code_push_example
package_path: shorebird_code_push/example
has_bloc_lint: false
has_unit_tests: false
subpackages: ""
flutter_version: ""
has_integration_tests: false
cspell:
name: CSpell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: streetsidesoftware/cspell-action@v8
with:
incremental_files_only: false
config: cspell.config.yaml
required:
name: required
if: ${{ always() }}
needs:
- changes
- shorebird_code_push
- shorebird_code_push_example
- cspell
runs-on: ubuntu-latest
steps:
- name: Check required jobs
run: |
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more required jobs failed or were cancelled."
exit 1
fi
echo "All required jobs passed (or were skipped because nothing changed)."
+3
View File
@@ -38,6 +38,7 @@ words:
- Decompressor
- dllexport
- dlopen
- dorny
- downloadables
- EACCES
- EDQUOT
@@ -48,6 +49,7 @@ words:
- ENOSPC
- EROFS
- eseidel
- felangel
- ffigen
- gclient
- hdpi
@@ -84,6 +86,7 @@ words:
- sigstore
- staticlib
- subosito
- subpackages
- swiftpm
- symbolication
- tombstoned