Merge pull request #213 from poteto-go/20250126/refact-option #137
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-1_23 | |
on: | |
push: | |
paths: | |
- "**.go" | |
- "**.md" | |
- "**.yaml" | |
- "**.mod" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: . | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23.x" | |
# noinlineによるテスト実行 | |
# https://github.com/poteto-go/poteto/issues/169 | |
- name: Test | |
run: go test ./... -coverprofile cover.out.tmp -bench . -benchtime 100000x -gcflags=all=-l | |
- name: remove ruleguard path | |
run: cat cover.out.tmp | grep -v "github.com/poteto-go/poteto/rules" > coverage.out.tmp | |
- name: remove not constant path | |
run: cat coverage.out.tmp | grep -v "github.com/poteto-go/poteto/constant" > coverage.txt | |
- name: upload coverage | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |