Skip to content

Commit b285231

Browse files
possibly even better
1 parent 7122b3b commit b285231

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/on-pr-push-code-check.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,35 @@ jobs:
1919
- 'pubspec.yaml'
2020
- 'tools/add_imports/pubspec.yaml'
2121

22+
- name: Early exit
23+
if: steps.check_files.outputs.files_exists == 'false'
24+
run: |
25+
gh run cancel ${{ github.run_id }}
26+
gh run watch ${{ github.run_id }}
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
2230
- name: Setup dart
23-
if: steps.check_files.outputs.files_exists == 'true'
2431
uses: dart-lang/setup-dart@v1
2532

2633
- name: Get main dependencies
27-
if: steps.check_files.outputs.files_exists == 'true'
2834
run: dart pub get
2935

3036
- name: Get add_imports dependencies
31-
if: steps.check_files.outputs.files_exists == 'true'
3237
run: dart pub get
3338
working-directory: tools/add_imports
3439

3540
- name: Run static code analysis
36-
if: steps.check_files.outputs.files_exists == 'true'
3741
uses: invertase/github-action-dart-analyzer@v1
3842
with:
3943
fatal-infos: true
4044

4145
- name: Dart Code Metrics
42-
if: steps.check_files.outputs.files_exists == 'true'
4346
uses: solid-software/dart-code-metrics-action@v5
4447
with:
4548
github_token: ${{ secrets.GITHUB_TOKEN }}
4649
fatal_warnings: true
4750
fatal_style: true
4851

4952
- name: Check formatting
50-
if: steps.check_files.outputs.files_exists == 'true'
5153
run: dart format . --set-exit-if-changed

0 commit comments

Comments
 (0)