From f6d4a27a724a262372deed4e38cadb78c3b413b7 Mon Sep 17 00:00:00 2001 From: Nico Bistolfi <4433590+nicobistolfi@users.noreply.github.com> Date: Tue, 3 Sep 2024 18:29:39 -0700 Subject: [PATCH] codecov (#18) * codecov * codecov * codecov --------- Co-authored-by: Nico Bistolfi --- .github/workflows/codecov.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..00cae3b --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,28 @@ +name: Run tests and upload coverage + +on: + push + +jobs: + test: + name: Run tests and collect coverage + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + + - name: Install dependencies + run: go mod download + + - name: Run tests + run: go test ./... -coverprofile=coverage.txt + + - name: Upload results to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file