diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000..37d63ccae --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,25 @@ +name: Coverage + +on: + pull_request: + +jobs: + coverage: + name: Run Tests and Upload Coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-go@v6 + with: + go-version-file: go.mod + + - name: Run tests with coverage + run: go list ./... | grep -v -e /test -e /e2e | xargs go test -race -coverprofile=coverage.out -covermode=atomic + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + verbose: true + dry_run: true diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..328150d9d --- /dev/null +++ b/codecov.yml @@ -0,0 +1,17 @@ +coverage: + status: + project: + default: + target: auto + threshold: 1% + informational: false + + patch: + default: + target: 70% + threshold: 0% + informational: false + only_pulls: true + + ignore: + - "**/e2e/**"