diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 239a463dc..03e64dca2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,11 @@ name: CI -on: [pull_request, workflow_dispatch] +on: + pull_request: + workflow_dispatch: + push: + branches: + - main jobs: main: @@ -26,8 +31,15 @@ jobs: - name: Test run: make test + - name: Archive code coverage results + uses: actions/upload-artifact@v4 + with: + name: code-coverage + path: coverage.out + config: name: Check GoReleaser config + if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - name: Checkout diff --git a/Makefile b/Makefile index 171d9864d..a3b64bb3d 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ lint: lint-golangci-lint lint-yamllint # Test test: @echo ">> Running tests for the CLI application" - @go test ./... -count=1 + @go test ./... -count=1 -coverprofile=coverage.out # Test coverage coverage: