From da64c45619b6357b869b2a052904ec0b6cc50495 Mon Sep 17 00:00:00 2001 From: Floris Cornel Date: Sun, 9 Jun 2024 11:50:00 +0100 Subject: [PATCH] add codecov workflow --- .github/workflows/coverage.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..44c89ae --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,35 @@ +name: test-coverage + +on: + push: + branches: + - main + pull_request: + + +permissions: + contents: read + + +jobs: + lint: + name: Lint and Format + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "stable" + + - name: Run coverage + run: go test -coverprofile=coverage.out -coverpkg=./... ./... + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + \ No newline at end of file