Skip to content

Commit

Permalink
Merge pull request #216 from yumemi-inc/feature/issue-206
Browse files Browse the repository at this point in the history
add: testの依存があるパッケージだけreport_testスクリプトの対象にする
  • Loading branch information
K9i-0 authored Jun 4, 2024
2 parents 0d19efb + 9708493 commit af2ff51
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,21 @@ jobs:
run: melos run report_test --no-select
continue-on-error: true

# https://github.com/andstor/file-existence-action
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
with:
# https://github.com/isaacs/node-glob の形式
files: "**/test_report.log"

# https://github.com/dorny/test-reporter
- name: Report test
if: steps.check_files.outputs.files_exists == 'true'
uses: dorny/test-reporter@eaa763f6ffc21c7a37837f56cd5f9737f27fc6c8 # v1.8.0
with:
name: "flutter test"
path: "(apps|packages/cores|packages/features)/*/test_report.log"
# https://github.com/mrmlnc/fast-glob の形式
path: "(apps|packages)/**/test_report.log"
reporter: "flutter-json"
fail-on-error: "true"
2 changes: 2 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ command:
riverpod_generator: ^2.4.0
riverpod_lint: ^2.3.10
yumemi_lints: ^2.0.0
test: ^1.24.0

scripts:
report_test:
exec: flutter test --no-pub --machine > test_report.log
packageFilters:
flutter: true
dependsOn: test

format:
exec: bash "$MELOS_ROOT_PATH/scripts/format.sh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
test: ^1.24.0
yumemi_lints: ^2.0.0

flutter:

0 comments on commit af2ff51

Please sign in to comment.