Skip to content
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

テスト結果をGitHub Actionsの実行サマリーに表示できるようにする #353

Merged
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
17 changes: 16 additions & 1 deletion .github/workflows/back-sample-pull-request-ut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,29 @@ jobs:
- name: gradlewに実行権限付与
run: chmod +x samples/web-csr/dressca-backend/gradlew

- name: ビルド(コンパイル, 静的テスト, JUnit)実行
- id: run-build-and-tests
name: ビルド(コンパイル, 静的テスト, JUnit)実行
run: ./gradlew build
working-directory: ./samples/web-csr/dressca-backend
continue-on-error: true

- name: ビルド(コンパイル, 静的テスト, JUnit)成功
if: ${{ steps.run-build-and-tests.outcome == 'success' }}
run: |
echo '## Test Result :memo:' >> $GITHUB_STEP_SUMMARY
echo ':heavy_check_mark: ビルドとテストに成功しました。' >> $GITHUB_STEP_SUMMARY

- name: ビルド(コンパイル, 静的テスト, JUnit)失敗
if: ${{ steps.run-build-and-tests.outcome == 'failure' }}
run: |
echo '## Test Result :memo:' >> $GITHUB_STEP_SUMMARY
echo ':x: ビルドまたはテストに失敗しました。' >> $GITHUB_STEP_SUMMARY

- name: JUnitレポート
uses: mikepenz/action-junit-report@v3
with:
report_paths: '**/build/test-results/test/TEST-*.xml'

- name: Report
uses: dorny/test-reporter@v1
if: always()
Expand Down