Skip to content

fix: コンフリクトの解消 #202

fix: コンフリクトの解消

fix: コンフリクトの解消 #202

name: RearCameraSystemTest
on: [push]
jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Set up Python
uses: actions/checkout@v2
with:
python-version: '3.10.9'
# 依存関係をキャッシュ
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run unittest
run: make utest
# 参考資料
# - 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 }}