diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..c73d3815 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,25 @@ +name: Code Coverage + +on: + pull_request: + +jobs: + test-and-coverage: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.22' + + - name: Install dependencies + run: go mod download + + - name: Run tests with coverage + run: | + mkdir -p coverage + go test -v -coverpkg=./... -coverprofile=coverage/coverage.out -covermode=atomic ./...