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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Setup Go Version run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV - name: Install Go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 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@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0