add octocov config #2
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: test | |
on: | |
push: | |
branches-ignore: | |
- main | |
workflow_dispatch: | |
# 環境変数を設定 | |
env: | |
DOCKER_IMAGE_TAG: "backend" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Run golangci-lint with Reviewdog | |
uses: reviewdog/action-golangci-lint@v2 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
go_version: 1.21 | |
reporter: github-pr-review | |
level: warning | |
go_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Go Setup | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Run Test | |
run: go test -v ./... -coverprofile=coverage.out | |
- name: Run Octocov | |
uses: k1LoW/octocov-action@v0 |