diff --git a/.circleci/config.yml b/.circleci/config.yml index f180c86..36b7f67 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,10 +1,12 @@ # Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 +orbs: + codecov: codecov/codecov@5.0.3 jobs: build: working_directory: ~/repo docker: - - image: cimg/go:1.21 + - image: cimg/go:1.22 steps: - checkout - restore_cache: @@ -21,7 +23,8 @@ jobs: name: Run tests command: | mkdir -p /tmp/test-reports - gotestsum --junitfile /tmp/test-reports/unit-tests.xml -- -json -race ./... + gotestsum --junitfile /tmp/test-reports/unit-tests.xml -- -coverprofile=coverage.out -covermode=atomic -json -race ./... + - codecov/upload - store_artifacts: path: /tmp/test-reports - store_test_results: diff --git a/.github/workflows/go.coverage.yml b/.github/workflows/go.coverage.yml deleted file mode 100644 index 05c7bca..0000000 --- a/.github/workflows/go.coverage.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Go Coverage -on: - pull_request: - push: - branches: - - master -jobs: - test: - name: Coverage - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Run coverage - run: go test ./... -race -coverprofile=coverage.out -covermode=atomic - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}