-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* style: Added very_good_analysis for hooks * style: Added exception for template analysis * build: Added very_good_analysis dependency * style: Fixed analysis issues * ci: Added GitHub workflow
- Loading branch information
Showing
6 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Very Good Workflow | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "lib/**" | ||
- "test/**" | ||
- "pubspec.yaml" | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "hooks/**" | ||
- "hooks/test/**" | ||
- "pubspec.yaml" | ||
|
||
jobs: | ||
semantic-pull-request: | ||
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 | ||
|
||
build: | ||
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1 | ||
|
||
ci: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./hooks | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dart-lang/setup-dart@v1 | ||
|
||
- name: Install Dependencies | ||
run: dart pub get | ||
|
||
- name: Format | ||
run: dart format --set-exit-if-changed . | ||
|
||
- name: Analyze | ||
run: dart analyze --fatal-infos --fatal-warnings . | ||
|
||
- name: Run Tests | ||
run: | | ||
dart pub global activate coverage 1.3.0 | ||
dart test --coverage=coverage && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Don't analyze templates | ||
analyzer: | ||
exclude: [__brick__] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include: package:very_good_analysis/analysis_options.3.0.1.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,6 @@ environment: | |
|
||
dependencies: | ||
mason: ^0.1.0-dev | ||
|
||
dev_dependencies: | ||
very_good_analysis: ^3.1.0 |