Skip to content

Reactプロジェクトの作成 #55

Reactプロジェクトの作成

Reactプロジェクトの作成 #55

Workflow file for this run

name: Go test coverage check
on: pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-go@v3
with:
go-version: 1.21.0
- name: run coverage
run: |
make coverage
- name: Find existing comment
id: find_comment
uses: peter-evans/find-comment@v2
with:
issue-number: ${{ github.event.number }}
body-includes: "## Test Coverage Report"
- name: Delete existing comment
if: steps.find_comment.outputs.comment-id
run: |
curl \
-X DELETE \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${{ github.repository }}/issues/comments/${{ steps.find_comment.outputs.comment-id }}"
- name: Comment coverage on PR
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.number }}
body-path: 'backend/coverage.txt'