From ee6c664caf9ac862aa2d1ce921855261fdc2a8ac Mon Sep 17 00:00:00 2001 From: Pranay Valson Date: Wed, 27 Sep 2023 10:18:46 -0700 Subject: [PATCH 1/2] add test coverage reports Signed-off-by: Pranay Valson --- .github/workflows/test-coverage.yml | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/test-coverage.yml diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml new file mode 100644 index 00000000..e1e1b940 --- /dev/null +++ b/.github/workflows/test-coverage.yml @@ -0,0 +1,35 @@ +name: go-test + +on: + push: + branches: + - "main" + pull_request: + branches: + - "main" + - "develop" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup Go 1.19.x + uses: actions/setup-go@v4 + with: + # Semantic version range syntax or exact version of Go + go-version: '1.19.x' + cache-dependency-path: ./go.sum + - name: Install dependencies + run: | + go get -d ./... + - name: Build Binaries + run: go build -v ./... + - name: Test with the Go CLI + run: go test ./... -coverprofile=coverage.out + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + From 221ff02a7241e5b3bfa4763731ac6d81be5e5d46 Mon Sep 17 00:00:00 2001 From: Pranay Valson Date: Wed, 27 Sep 2023 10:36:40 -0700 Subject: [PATCH 2/2] update readme coverage reports Signed-off-by: Pranay Valson --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f916d422..8c8be047 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Lines of code + Discord