refactor(shorebird_code_push): ffi + noop implementation and web compat (#55)

This commit is contained in:
Felix Angelov
2023-07-14 15:30:35 -05:00
committed by GitHub
parent d3ec0a3aaf
commit 4ceb37dc1e
18 changed files with 615 additions and 319 deletions
@@ -1,5 +1,5 @@
name: Dart Package Workflow
description: Build and test your Dart packages.
name: Flutter Package Workflow
description: Build and test your Flutter packages.
inputs:
codecov_token:
@@ -13,10 +13,6 @@ inputs:
required: false
default: ""
description: Globs to exclude from coverage
dart_sdk:
required: false
default: "stable"
description: "The dart sdk version to use"
working_directory:
required: false
default: "."
@@ -41,14 +37,12 @@ inputs:
runs:
using: "composite"
steps:
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{inputs.dart_sdk}}
- uses: subosito/flutter-action@v2
- name: Install Dependencies
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: dart pub get
run: flutter pub get
- name: Format
working-directory: ${{ inputs.working_directory }}
@@ -64,7 +58,7 @@ runs:
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: |
dart pub global activate coverage
flutter pub global activate coverage
dart test -j ${{inputs.concurrency}} --coverage=coverage --platform=${{inputs.platform}} && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=${{inputs.report_on}} --check-ignore
- name: Upload Coverage
+9 -9
View File
@@ -18,7 +18,7 @@ jobs:
pull-requests: read
outputs:
needs_dart_build: ${{ steps.needs_dart_build.outputs.changes }}
needs_flutter_build: ${{ steps.needs_flutter_build.outputs.changes }}
needs_rust_build: ${{ steps.needs_rust_build.outputs.changes }}
name: 👀 Detect Changes
@@ -29,12 +29,12 @@ jobs:
- uses: dorny/paths-filter@v2
name: Build Detection
id: needs_dart_build
id: needs_flutter_build
with:
filters: |
shorebird_code_push:
- ./.github/workflows/main.yaml
- ./.github/actions/dart_package/action.yaml
- ./.github/actions/flutter_package/action.yaml
- shorebird_code_push/**
- uses: dorny/paths-filter@v2
@@ -71,13 +71,13 @@ jobs:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
working_directory: ${{ matrix.crate }}
build_dart_packages:
build_flutter_packages:
needs: changes
if: ${{ needs.changes.outputs.needs_dart_build != '[]' }}
if: ${{ needs.changes.outputs.needs_flutter_build != '[]' }}
strategy:
matrix:
package: ${{ fromJSON(needs.changes.outputs.needs_dart_build) }}
package: ${{ fromJSON(needs.changes.outputs.needs_flutter_build) }}
runs-on: ubuntu-latest
@@ -89,15 +89,15 @@ jobs:
with:
submodules: recursive
- name: 🎯 Build ${{ matrix.package }}
uses: subosito/flutter-action@v2.10.0
- name: 🐦 Build ${{ matrix.package }}
uses: ./.github/actions/flutter_package
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
coverage_excludes: "**/*.g.dart"
working_directory: ${{ matrix.package }}
ci:
needs: [semantic_pull_request, build_dart_packages, build_rust_crates]
needs: [semantic_pull_request, build_flutter_packages, build_rust_crates]
if: ${{ always() }}
runs-on: ubuntu-latest