name: Go Coverage on: [pull_request] permissions: contents: read jobs: test: name: Coverage runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v4 - name: Setup Go Version run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV - name: Install Go uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} id: go - name: Build run: go build -v ./... - name: Test With Coverage run: | go install github.com/fatih/faillint@latest for d in request core coremain plugin test; do \ ( cd $d; go test -coverprofile=cover.out -covermode=atomic -race ./...; [ -f cover.out ] && cat cover.out >> ../coverage.txt ); \ done - name: Upload coverage to Codecov uses: codecov/codecov-action@7afa10ed9b269c561c2336fd862446844e0cbf71