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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup Go Version run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV - name: Install Go uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 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@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1