Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ jobs:
- name: Statically analyze the Dart code for any errors
run: flutter analyze .

- name: Install Danger JS
run: npm install -g danger

- name: Activate Danger Dart
run: dart pub global activate danger_dart

- name: Run danger ci
run: danger_dart ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run widget tests, unit tests
run: flutter test --machine --coverage

Expand Down
11 changes: 11 additions & 0 deletions bricks/template/__brick__/.github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ jobs:
- name: Statically analyze the Dart code for any errors
run: flutter analyze .

- name: Install Danger JS
run: npm install -g danger

- name: Activate Danger Dart
run: dart pub global activate danger_dart

- name: Run danger ci
run: danger_dart ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run widget tests, unit tests
run: flutter test --machine --coverage

Expand Down
3 changes: 3 additions & 0 deletions bricks/template/__brick__/dangerfile.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
flutter_lint.only_modified_files = true
flutter_lint.report_path = "flutter_analyze_report.txt"
flutter_lint.lint(inline_mode: true)
1 change: 1 addition & 0 deletions bricks/template/__brick__/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ dev_dependencies:
json_serializable: ^6.6.2
mockito: ^5.4.0
retrofit_generator: ^7.0.0
danger_core:

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
11 changes: 11 additions & 0 deletions sample/.github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ jobs:
- name: Statically analyze the Dart code for any errors
run: flutter analyze .

- name: Install Danger JS
run: npm install -g danger

- name: Activate Danger Dart
run: dart pub global activate danger_dart

- name: Run danger ci
run: danger_dart ci
env:
GITHUB_TOKEN: $

- name: Run widget tests, unit tests
run: flutter test --machine --coverage

Expand Down
7 changes: 7 additions & 0 deletions sample/dangerfile.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import 'package:danger_core/danger_core.dart';

void main() {
if (danger.github.pr.title.contains('WIP')) {
warn('PR is considered WIP');
}
}
1 change: 1 addition & 0 deletions sample/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ dev_dependencies:
json_serializable: ^6.6.2
mockito: ^5.4.0
retrofit_generator: ^7.0.0
danger_core:

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down