Github Actions Generator for Dart & Flutter Monorepos
Run mason make github_actions_dart
in the root of your monorepo. This will:
- Scan your project for any
pubspec.yaml
files to grab their name and if they use Flutter. If will also find any path dependencies in the repo and create a small dependency tree. - Create a
[PACKAGE_NAME]_verify_and_test.yaml
file for each package under the.github/workflows
directory that calls the corresponding Very Good Workflow. These will trigger on pull requests and pushes to the main/master branch, and will trigger if the current package has changes, or any of its path dependencies. - Creates a
verify_github_actions.yaml
that will enforcemason make github_actions_dart
has been run to make sure all your packages are covered.
Tips
- You can exclude packages from the generation by changing the
exclude
variable. Just make sure it's formatted as an array of strings. - You can exclude lines of code from coverage on the packages by adding a coverage_exclude section to the package's
pubspec.yaml
file. - You can control the test coverage two ways:
- The first priority is on the package's
pubspec.yaml
file by setting theminimum_coverage
field. - The second priority if the
minCoverage
variable passed into the brick. - If neither is set, a default of 100% will be set.
- The first priority is on the package's
Example pubspec.yaml
name: my_awesome_dart_package
dependencies:
...
coverage_exclude:
- "**/*.g.dart"
- "**/*.ignorethis"
minimum_coverage: 100