Skip to content

Commit

Permalink
テストレポート送信のジョブ分割が難しいためシリアルで実行
Browse files Browse the repository at this point in the history
  • Loading branch information
narunblog committed Jul 31, 2023
1 parent 632feec commit b24fcac
Showing 1 changed file with 40 additions and 35 deletions.
75 changes: 40 additions & 35 deletions .github/workflows/flutter_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,42 +47,9 @@ jobs:
# テストを実行
- name: Run Flutter Test by melos
run: melos exec --sdk-path=${{ runner.tool_cache }}/flutter -- "flutter test --machine --coverage > test-report.log"
# # テスト結果を GitHub Actions に表示する
# - name: Report Test
# uses: dorny/test-reporter@v1
# # テスト結果を表示するのでテストが失敗しても実行する
# if: always()
# with:
# name: Flutter Test Report mottai_flutter_app
# path: /home/runner/work/mottai-flutter-app/mottai-flutter-app/packages/mottai_flutter_app/test-report.log
# reporter: flutter-json
# # Codecov に結果を送信
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v2
# with:
# token: ${{secrets.CODECOV_TOKEN}}
# file: /home/runner/work/mottai-flutter-app/mottai-flutter-app/packages/mottai_flutter_app/coverage/lcov.info
# fail_ci_if_error: true
# flags: unittests_mottai_flutter_app
# verbose: true

# test report mottai_flutter_app
test_report_mottai_flutter_app:
name: test report mottai_flutter_app
# テストジョブが成功したら実行する
needs:
- flutter_test
# ジョブを実行するOS
runs-on: ubuntu-latest
# タイムアウト時間(分)
timeout-minutes: 10
# ジョブの手順
steps:
# ソースコードをチェックアウト
- name: Checkout
uses: actions/checkout@v3
# テスト結果を GitHub Actions に表示する
- name: Report Test
# mottai_flutter_appのテスト結果を GitHub Actions に表示する
- name: Report Test mottai_flutter_app
uses: dorny/test-reporter@v1
# テスト結果を表示するのでテストが失敗しても実行する
if: always()
Expand All @@ -99,3 +66,41 @@ jobs:
fail_ci_if_error: true
flags: unittests_mottai_flutter_app
verbose: true

# firebase_commonのテスト結果を GitHub Actions に表示する
- name: Report Test firebase_common
uses: dorny/test-reporter@v1
# テスト結果を表示するのでテストが失敗しても実行する
if: always()
with:
name: Flutter Test Report mottai_flutter_app
path: /home/runner/work/mottai-flutter-app/mottai-flutter-app/packages/firebase_common/test-report.log
reporter: flutter-json
# Codecov に結果を送信
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{secrets.CODECOV_TOKEN}}
file: /home/runner/work/mottai-flutter-app/mottai-flutter-app/packages/firebase_common/coverage/lcov.info
fail_ci_if_error: true
flags: unittests_firebase_common
verbose: true

# dart_flutter_commonのテスト結果を GitHub Actions に表示する
- name: Report Test dart_flutter_common
uses: dorny/test-reporter@v1
# テスト結果を表示するのでテストが失敗しても実行する
if: always()
with:
name: Flutter Test Report dart_flutter_common
path: /home/runner/work/mottai-flutter-app/mottai-flutter-app/packages/dart_flutter_common/test-report.log
reporter: flutter-json
# Codecov に結果を送信
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{secrets.CODECOV_TOKEN}}
file: /home/runner/work/mottai-flutter-app/mottai-flutter-app/packages/dart_flutter_common/coverage/lcov.info
fail_ci_if_error: true
flags: unittests_dart_flutter_common
verbose: true

0 comments on commit b24fcac

Please sign in to comment.