fix: パラメータ調整をテストに反映、フォーマット #748
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Google Test | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: gtest | |
run: make gtest | |
# 参考資料 | |
# - Slack が提供する GitHub Action "slack-send" を使って GitHub から Slack に通知する - Qiita | |
# https://qiita.com/seratch/items/28d09eacada09134c96c | |
# NOTE: | |
# "Repository: <${{ [以下略]"の部分は、良い感じに改行する方法を見つけられなかった... | |
- name: Failure Notification | |
if: failure() | |
uses: slackapi/slack-github-action@v1.21.0 | |
with: | |
payload: | | |
{ | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": ":warning: CI結果: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ job.status }}>" | |
} | |
}, | |
{ | |
"type": "context", | |
"elements": [ | |
{ | |
"type": "mrkdwn", | |
"text": "Repository: <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}>\nBranch: `${{ github.ref_name }}`\nWorkflow: `${{ github.workflow }}`\nAuthor: <https://github.com/${{ github.event.sender.login }}|@${{ github.event.sender.login }}>" | |
} | |
] | |
} | |
] | |
} | |
env: | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }} |