Developed with 💙 by Very Good Ventures 🦄
Reusable GitHub Workflows used at Very Good Ventures 🦄
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
# A reusable workflow for running a spell check
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
# A reusable workflow for publishing flutter packages
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_pub_publish.yml@v1
# A reusable workflow for publishing dart packages
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_pub_publish.yml@v1
For a more detailed guide, including tips and tricks, check out our blog.
The Dart package workflow consists of the following steps:
- Install Dependencies
- Format
- Analyze
- Run tests
- Check Code Coverage
Optional The number of concurrent test suites run.
Default 4
Optional List of paths to exclude from the coverage report, separated by an empty space. Supports globs
to describe file patterns.
Default ""
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"
Optional The minimum coverage percentage allowed.
Default 100
Optional The path to the root of the Dart package.
Default "."
Optional A space separated list of folders that should be analyzed.
Default "lib test"
Optional Allows ignoring lines from coverage.
Default false
Optional A comma separated list of folders that should be checked in code coverage.
Default "lib"
Optional An optional operating system on which to run the workflow.
Default "ubuntu-latest"
Optional An optional command that should be executed immediately after dependencies are installed.
Default ""
Optional An optional, comma-separated list of platform(s) on which to run the tests.
[vm (default), chrome, firefox, safari, node]
Default "vm"
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"
platform: "chrome,vm"
working_directory: "examples/my_dart_package"
The Flutter package workflow consists of the following steps:
- Install Dependencies
- Format
- Analyze
- Run tests
- Check Code Coverage
Optional A space separated list of folders that should be analyzed.
Default "lib test"
Optional The number of concurrent test suites run.
Default 4
Optional List of paths to exclude from the coverage report, separated by an empty space. Supports globs
to describe file patterns.
Default ""
Optional The Flutter release channel to use (e.g. stable
).
Default "stable"
Optional The Flutter SDK version to use (e.g. 2.8.1
).
Default ""
Optional The minimum coverage percentage allowed.
Default 100
Optional An optional command that should be executed immediately after dependencies are installed.
Default ""
Optional The path to the root of the Flutter package.
Default "."
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.
Optional Whether to recursively run tests in nested directories.
Default false
Optional An optional operating system on which to run the workflow.
Default "ubuntu-latest"
Optional List of paths to exclude from packages get
. Supports globs
to describe file patterns.
Default "!*"
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
Optional Configure which types are allowed (e.g. "feat, fix, docs"
).
Note: If not set then the action uses the list of Conventional Commits type of the commitizen.
Optional Configure which scopes are allowed (e.g. "dart_package, flutter_package"
).
The semantic pull request package workflow consists of the following steps:
- Ensure Commit is Semantic
name: My Workflow
on: pull_request
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1
The pana workflow consists of the following steps:
- Install Pana
- Verify Pana Score
Optional Which version of package:pana
to use (e.g. 0.21.15
).
Optional The minimum score allowed.
Default 120
Optional The path to the root of the Dart package.
Default "."
Optional An optional operating system on which to run the workflow.
Default "ubuntu-latest"
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"
The spell check workflow consists of the following steps:
- Git Checkout
- Run Spell Check
Optional The location of the cspell.json
.
Default ".github/cspell.json"
Optional The glob patterns to filter the files to be checked. Use a new line between patterns to define multiple patterns.
Default ""
Optional The path to the root of the Dart package.
Default "."
Optional An optional operating system on which to run the workflow.
Default "ubuntu-latest"
Optional An optional boolean which determines whether to log verbose output.
Default false
Optional An optional boolean which determines whether spell check is run on modified files.
Default true
name: My Workflow
on: pull_request
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
with:
includes: |
**/*.{dart,md,yaml}
!.dart_tool/**/*.{dart,yaml}
.*/**/*.yml
runs_on: macos-latest
modified_files_only: false
working_directory: examples/my_project
The Flutter Pub Publish workflow consists of the following steps:
- Install dependencies
- Setup pub credentials
- Dry run
- Publish
Optional The Flutter release channel to use (e.g. stable
).
Default "stable"
Optional The Flutter SDK version to use (e.g. 2.8.1
).
Default ""
Optional The path to the root of the Flutter package.
Default "."
Optional An optional operating system on which to run the workflow.
Default "ubuntu-latest"
Required The pub credentials needed for publishing. This can be retrieved by reading out your pub-credentials.json
on your system after you ran a flutter pub login
. The location of the file is different per operating system:
OS | Path |
---|---|
Linux | $XDG_CONFIG_HOME/dart/pub-credentials.json or $HOME/.config/dart/pub-credentials.json |
macOS | ~/Library/Application\ Support/dart/pub-credentials.json |
Windows | %APPDATA%/dart/pub-credentials.json |
We recommend using GitHub Secrets for safely storing and reading the credentials.
name: My Flutter Pub Publish Workflow
on:
push:
tags:
- 'my_flutter_package-v*.*.*'
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_pub_publish.yml@v1
with:
flutter_channel: "stable"
flutter_version: "2.8.1"
working_directory: "packages/my_flutter_package"
pub_credentials: ${{ secrets.PUB_CREDENTIALS }}
The Dart Pub Publish workflow consists of the following steps:
- Install dependencies
- Setup pub credentials
- Dry run
- Publish
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"
Optional The path to the root of the Dart package.
Default "."
Optional An optional operating system on which to run the workflow.
Default "ubuntu-latest"
Required The pub credentials needed for publishing. This can be retrieved by reading out your pub-credentials.json
on your system after you ran a dart pub login
, the location of the file is different per operating system:
OS | Path |
---|---|
Linux | $XDG_CONFIG_HOME/dart/pub-credentials.json or $HOME/.config/dart/pub-credentials.json |
macOS | ~/Library/Application\ Support/dart/pub-credentials.json |
Windows | %APPDATA%/dart/pub-credentials.json |
We recommend using GitHub Secrets for safely storing and reading the credentials.
name: My Dart Pub Publish Workflow
on: pull_request
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_pub_publish.yml@v1
with:
dart_sdk: "stable"
working_directory: "packages/my_dart_package"
pub_credentials: ${{ secrets.PUB_CREDENTIALS }}
The Mason Publish workflow consists of the following steps:
- Install Mason
- Setup Mason credentials
- Dry run
- Publish
Optional Which Mason version to use (e.g. 0.1.0-dev.50
).
Default ""
Optional The path to the root of the Mason brick.
Default "."
Optional An optional operating system on which to run the workflow.
Default "ubuntu-latest"
Required The mason credentials needed for publishing. This can be retrieved by reading out your mason-credentials.json
on your system after you ran a mason login
, the location of the file is different per operating system:
OS | Path |
---|---|
Linux | $XDG_CONFIG_HOME/mason/mason-credentials.json or $HOME/.config/mason/mason-credentials.json |
macOS | ~/Library/Application\ Support/mason/mason-credentials.json |
Windows | %APPDATA%/mason/mason-credentials.json |
We recommend using GitHub Secrets for safely storing and reading the credentials.
name: My Mason Brick Publish Workflow
on: pull_request
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/mason_publish.yml@v1
with:
mason_version: "0.1.0-dev.50"
working_directory: "packages/my_mason_brick"
mason_credentials: ${{ secrets.MASON_CREDENTIALS }}