From 563d447be9f3a086cc5c65ce9c15e1173da6931d Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 25 Mar 2024 01:58:34 +0000 Subject: [PATCH] ci: fix test workflow, enable coverage workflow --- .github/workflows/ci.yml | 46 ++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a314d2e..1b809d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,44 +30,40 @@ jobs: - name: Check if mods are tidy run: make check-tidy - # cov: - # name: Coverage - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # - uses: actions/setup-go@v5 - # with: - # go-version: "1.20" - # - name: Publish coverage - # uses: paambaati/codeclimate-action@v5.0.0 - # env: - # VERBOSE: "true" - # GOMAXPROCS: 4 - # CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - # with: - # coverageCommand: make cov - # prefix: github.com/${{ github.repository }} - # coverageLocations: | - # ${{ github.workspace }}/coverage.out:gocov + cov: + name: Coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.20" + - name: Publish coverage + uses: paambaati/codeclimate-action@v5.0.0 + env: + VERBOSE: "true" + GOMAXPROCS: 4 + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + with: + coverageCommand: make cov + prefix: github.com/${{ github.repository }} + coverageLocations: | + ${{ github.workspace }}/coverage.out:gocov test: name: Test strategy: fail-fast: false matrix: - os: - - ubuntu-latest - - macos-latest - - windows-latest go_version: - "1.20" - "1.21" - "1.22" - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: ${{ matrix.go_version }} - name: Run tests run: go test -v -count=1 -race ./...