Files
shorebird-updater/.github/actions/flutter_package/action.yaml
T
dependabot[bot] 83df31b60e chore(deps): bump the gh-deps group across 5 directories with 2 updates (#362)
Bumps the gh-deps group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [codecov/codecov-action](https://github.com/codecov/codecov-action).
Bumps the gh-deps group with 1 update in the /.github/actions/dart_package directory: [codecov/codecov-action](https://github.com/codecov/codecov-action).
Bumps the gh-deps group with 1 update in the /.github/actions/flutter_package directory: [codecov/codecov-action](https://github.com/codecov/codecov-action).
Bumps the gh-deps group with 1 update in the /.github/actions/publish_flutter_package directory: [actions/checkout](https://github.com/actions/checkout).
Bumps the gh-deps group with 1 update in the /.github/actions/rust_crate directory: [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `actions/checkout` from 6 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

Updates `codecov/codecov-action` from 6 to 7
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v6...v7)

Updates `codecov/codecov-action` from 6 to 7
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v6...v7)

Updates `codecov/codecov-action` from 6 to 7
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v6...v7)

Updates `actions/checkout` from 6 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

Updates `codecov/codecov-action` from 6 to 7
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: gh-deps
- dependency-name: codecov/codecov-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: gh-deps
- dependency-name: codecov/codecov-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: gh-deps
- dependency-name: codecov/codecov-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: gh-deps
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: gh-deps
- dependency-name: codecov/codecov-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: gh-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-23 15:45:05 -07:00

100 lines
3.3 KiB
YAML

name: Flutter Package Workflow
description: Build and test your Flutter packages.
inputs:
codecov_token:
required: true
description: The Codecov token used to upload coverage
concurrency:
required: false
default: "4"
description: The value of the concurrency flag (-j) used when running tests
coverage_excludes:
required: false
default: ""
description: Globs to exclude from coverage
working_directory:
required: false
default: "."
description: The working directory for this workflow
min_coverage:
required: false
default: "100"
description: The minimum coverage percentage value
analyze_directories:
required: false
default: "lib test"
description: Directories to analyze
report_on:
required: false
default: "lib"
description: Directories to report on when collecting coverage
example_platform:
required: false
default: "web"
description: Platform to use when building example
runs:
using: "composite"
steps:
- uses: subosito/flutter-action@v2
- name: Install Dependencies
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: flutter pub get
- name: Format
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: dart format --set-exit-if-changed .
- name: Analyze
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: dart analyze --fatal-warnings ${{inputs.analyze_directories}}
- name: Build Example
working-directory: ${{ inputs.working_directory }}/example
shell: ${{ inputs.shell }}
run: flutter build ${{ inputs.example_platform }}
- name: Test
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: flutter test --coverage
- name: Exclude Generated Code from Coverage
if: ${{ inputs.coverage_excludes != '' }}
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: |
mv coverage/lcov.info coverage/lcov.info.bak
sudo apt-get -y install lcov
lcov --remove coverage/lcov.info.bak "${{inputs.coverage_excludes}}" -o coverage/lcov.info
# Per https://stackoverflow.com/questions/73402042/github-action-expressions-split-string
- name: Split package name
env:
PACKAGE_PATH: ${{ inputs.working_directory}}
id: split
shell: ${{ inputs.shell }}
run: echo "package_name=${PACKAGE_PATH##*/}" >> $GITHUB_OUTPUT
- name: Upload Coverage
uses: codecov/codecov-action@v7
with:
# We use Codecov's carryforward flags to allow our PR testing to only
# run affected packages, but also allow our coverage information from
# past runs to "carry forward" on a "per flag" basis. We tag coverage
# information with "flags" explaining what directory the coverage is from.
# https://docs.codecov.com/docs/carryforward-flags
flags: ${{ steps.split.outputs.package_name }}
token: ${{ inputs.codecov_token }}
- uses: VeryGoodOpenSource/very_good_coverage@v3
with:
path: ${{inputs.working_directory}}/coverage/lcov.info
exclude: ${{inputs.coverage_excludes}}
min_coverage: ${{inputs.min_coverage}}