-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR の解析・テストを行うワークフロー追加 #37
Changes from all commits
f9635ac
a3ff958
263ad78
8f3eb95
6292320
f00962f
824bcbb
b6afcfa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: check-pr | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-22.04 | ||
|
||
timeout-minutes: 10 | ||
|
||
steps: | ||
# https://github.com/actions/checkout | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# https://github.com/kuhnroyal/flutter-fvm-config-action | ||
- name: Fetch flutter config | ||
uses: kuhnroyal/flutter-fvm-config-action@v2 | ||
id: fvm-config-action | ||
|
||
# https://github.com/subosito/flutter-action | ||
- name: Setup flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} | ||
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} | ||
|
||
- name: Setup melos | ||
run: | | ||
ln -s $FLUTTER_ROOT .fvm/flutter_sdk | ||
dart pub global activate melos | ||
melos bootstrap | ||
|
||
# https://github.com/invertase/github-action-dart-analyzer | ||
- name: Report analyze | ||
uses: invertase/github-action-dart-analyzer@v2.0.0 | ||
with: | ||
fatal-infos: true | ||
blendthink marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Run test | ||
run: melos run report_test --no-select | ||
continue-on-error: true | ||
|
||
# https://github.com/dorny/test-reporter | ||
- name: Report test | ||
uses: dorny/test-reporter@v1 | ||
with: | ||
name: 'flutter test' | ||
path: '(apps|packages/cores|packages/features)/*/test_report.log' | ||
reporter: 'flutter-json' | ||
fail-on-error: 'true' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,22 +5,20 @@ targets: | |
# https://github.com/dart-lang/build/blob/master/docs/faq.md#how-do-i-avoid-running-builders-on-unnecessary-inputs | ||
generate_for: | ||
include: | ||
- lib/model/*.dart | ||
- lib/**/model/*.dart | ||
- lib/{model,**/model}/**.dart | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lib/model などが必要かどうかは微妙? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ここどうするかは悩ましいですが、いったんこのままでいいかなと思いました、、! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 中で https://pub.dev/packages/glob を使ってるみたいで、このページ参考にしました! |
||
# https://github.com/google/json_serializable.dart/tree/master/json_serializable#build-configuration | ||
json_serializable: | ||
generate_for: | ||
include: | ||
- lib/model/*.dart | ||
- lib/**/model/*.dart | ||
- lib/{model,**/model}/**.dart | ||
options: | ||
field_rename: snake | ||
# json のデシリアライズ時に発生する Exception を CheckedFromJsonException にまとめる | ||
checked: true | ||
riverpod_generator: | ||
generate_for: | ||
include: | ||
- lib/**/provider/*.dart | ||
- lib/{provider,**/provider}/**.dart | ||
# https://github.com/dart-lang/source_gen#ignore_for_file | ||
source_gen:combining_builder: | ||
options: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,12 @@ command: | |
dev_dependencies: | ||
yumemi_lints: ^1.3.0 | ||
|
||
scripts: | ||
report_test: | ||
exec: flutter test --no-pub --machine > test_report.log | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
気になる点
-r, --reporter Set how to print test results. If unset, value will default to either compact or expanded.
[compact] A single line that updates dynamically (The default reporter).
[expanded] A separate line for each update. May be preferred when logging to a file or in continuous integration.
[github] A custom reporter for GitHub Actions (the default reporter when running on GitHub Actions).
[json] A machine-readable format. See: https://dart.dev/go/test-docs/json_reporter.md |
||
packageFilters: | ||
flutter: true | ||
|
||
ide: | ||
intellij: | ||
# Disabling IntelliJ's automatic configuration. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
melos.yaml で指定しているため必要