Skip to content

Commit

Permalink
feat: add build version support (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel authored Jan 31, 2021
1 parent 525b475 commit 75db76f
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ jobs:
image: google/dart:2.9.3
steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: pub get

- name: Format
run: dartfmt --dry-run --set-exit-if-changed .

- name: Analyze
run: dartanalyzer --fatal-infos --fatal-warnings .

- name: Ensure Build
run: pub run test --run-skipped -t pull-request-only
3 changes: 3 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include: package:very_good_analysis/analysis_options.yaml
analyzer:
exclude:
- lib/src/version.dart
3 changes: 3 additions & 0 deletions dart_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tags:
pull-request-only:
skip: "Should only be run during pull request"
2 changes: 2 additions & 0 deletions lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ environment:
sdk: ">=2.8.1 <3.0.0"

dev_dependencies:
build_runner: ^1.10.0
build_verify: ^1.1.1
build_version: ^2.0.1
test: ^1.14.3
very_good_analysis: ^1.0.4

executables:
Expand Down
7 changes: 7 additions & 0 deletions test/ensure_build_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@Tags(['pull-request-only'])
import 'package:build_verify/build_verify.dart';
import 'package:test/test.dart';

void main() {
test('ensure_build', expectBuildClean);
}

0 comments on commit 75db76f

Please sign in to comment.