From 8bd3fc6fbf0896be619411c35b9ed6886af5b1d9 Mon Sep 17 00:00:00 2001 From: Edmar Felipe Date: Sat, 24 Aug 2024 16:20:43 -0300 Subject: [PATCH] chore: Update Go build workflow and Makefile, improve CI --- .github/workflows/build.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65f3f08..cc87d67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,16 +1,15 @@ name: Go env: - GO_VERSION: '1.23' - GO_LINT_VERSION: 'v1.60.3' + GO_VERSION: "1.23" + GO_LINT_VERSION: "v1.60.3" on: push: branches: - - develop - main - pull_request: + types: [opened, reopened, synchronize] permissions: # Required: allow read access to the content for analysis. @@ -54,3 +53,16 @@ jobs: go-version: ${{env.GO_VERSION}} - name: Test run: make test + - name: Archive code coverage results + uses: actions/upload-artifact@v4 + with: + name: code-coverage + path: coverage.txt + + coverage: + name: "Code coverage report" + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + needs: test + steps: + - uses: fgrosse/go-coverage-report@v1.0.2 \ No newline at end of file