very_good_workflows
very_good_workflows copied to clipboard
Reusable GitHub workflows used at Very Good Ventures 🦄
Very Good Workflows
Developed with 💙 by Very Good Ventures 🦄
Reusable GitHub Workflows used at Very Good Ventures 🦄
Quick Start
To get started add very good workflows to an existing GitHub workflow:
# A reusable workflow for Dart packages
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
# A reusable workflow for Flutter packages
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
# A reusable workflow for ensuring commits are semantic
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1
# A reusable workflow for verifying package scores on pub.dev
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1
For a more detailed guide, including tips and tricks, check out our blog.
Dart Package Workflow
Steps
The Dart package workflow consists of the following steps:
- Install Dependencies
- Format
- Analyze
- Run tests
- Check Code Coverage
Inputs
concurrency
Optional The number of concurrent test suites run.
Default 4
coverage_excludes
Optional List of paths to exclude from the coverage report, separated by an empty space. Supports globs
to describe file patterns.
Default ""
dart_sdk
Optional Which Dart SDK version to use. It can be a version (e.g. 2.12.0
) or a channel (e.g. stable
):
Default "stable"
min_coverage
Optional The minimum coverage percentage allowed.
Default 100
working_directory
Optional The path to the root of the Dart package.
Default "."
analyze_directories
Optional A space seperated list of folders that should be analyzed.
Default "lib test"
report_on
Optional A comma seperated list of folders that should be checked in code coverage.
Default "lib"
runs_on
Optional An optional operating system on which to run the workflow.
Default "ubuntu-latest"
Example Usage
name: My Dart Workflow
on: pull_request
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
coverage_excludes: "*.g.dart"
dart_sdk: "stable"
working_directory: "examples/my_dart_package"
Flutter Package Workflow
Steps
The Flutter package workflow consists of the following steps:
- Install Dependencies
- Format
- Analyze
- Run tests
- Check Code Coverage
Inputs
concurrency
Optional The number of concurrent test suites run.
Default 4
coverage_excludes
Optional List of paths to exclude from the coverage report, separated by an empty space. Supports globs
to describe file patterns.
Default ""
flutter_channel
Optional The Flutter release channel to use (e.g. stable
).
Default "stable"
flutter_version
Optional The Flutter SDK version to use (e.g. 2.8.1
).
Default ""
min_coverage
Optional The minimum coverage percentage allowed.
Default 100
working_directory
Optional The path to the root of the Flutter package.
Default "."
test_optimization
Optional Enable the test optimization.
Default true
Note: Since the optimization process groups tests into a single file, golden tests will not work properly. Consider disabling optimizations if you are using golden tests.
test_recursion
Optional Whether to recursively run tests in nested directories.
Default false
runs_on
Optional An optional operating system on which to run the workflow.
Default "ubuntu-latest"
Example Usage
name: My Flutter Workflow
on: pull_request
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
coverage_excludes: "*.g.dart"
flutter_channel: "stable"
flutter_version: "2.8.1"
working_directory: "examples/my_flutter_package"
test_recursion: true
Semantic Pull Request Workflow
Steps
The semantic pull request package workflow consists of the following steps:
- Ensure Commit is Semantic
Example Usage
name: My Workflow
on: pull_request
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1
Pana Workflow
Steps
The pana workflow consists of the following steps:
- Install Pana
- Verify Pana Score
Inputs
pana_version
Optional Which version of package:pana
to use (e.g. 0.21.15
).
min_score
Optional The minimum score allowed.
Default 120
working_directory
Optional The path to the root of the Dart package.
Default "."
runs_on
Optional An optional operating system on which to run the workflow.
Default "ubuntu-latest"
Example Usage
name: My Workflow
on: pull_request
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1
with:
min_score: 95
working_directory: "examples/my_flutter_package"