Skip to content

Commit

Permalink
Merge pull request #237 from taosdata/ci/codecov-3.0
Browse files Browse the repository at this point in the history
ci: codecov
  • Loading branch information
huskar-t authored Jan 29, 2024
2 parents b02c373 + d4b299b commit 82b81c6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
needs: build
strategy:
matrix:
go: [ '1.14', '1.19' ]
go: [ '1.14', 'stable' ]
name: Go ${{ matrix.go }}
steps:
- name: get cache server by pr
Expand All @@ -133,11 +133,6 @@ jobs:
restore-keys: |
${{ runner.os }}-build-${{ inputs.tbBranch }}-
- name: checkout
uses: actions/checkout@v3
with:
path: 'driver-go'

- name: prepare install
run: sudo apt install -y libgeos-dev

Expand All @@ -146,6 +141,9 @@ jobs:
tar -zxvf server.tar.gz
cd release && sudo sh install.sh
- name: checkout
uses: actions/checkout@v3

- name: shell
run: |
cat >start.sh<<EOF
Expand All @@ -162,7 +160,15 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
cache-dependency-path: driver-go/go.sum
cache-dependency-path: go.sum

- name: Test
run: cd ./driver-go && go test -v ./...
run: sudo go test -v --count=1 -coverprofile=coverage.txt -covermode=atomic ./...

- name: Upload coverage to Codecov
if: ${{ matrix.go }} == 'stable'
uses: codecov/codecov-action@v4-beta
with:
files: ./coverage.txt
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
22 changes: 14 additions & 8 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
needs: build
strategy:
matrix:
go: [ '1.14', '1.19' ]
go: [ '1.14', 'stable' ]
name: Go ${{ matrix.go }}
steps:
- name: get cache server
Expand All @@ -93,11 +93,6 @@ jobs:
restore-keys: |
${{ runner.os }}-build-${{ github.ref_name }}-
- name: checkout
uses: actions/checkout@v3
with:
path: 'driver-go'

- name: prepare install
run: sudo apt install -y libgeos-dev

Expand All @@ -106,6 +101,9 @@ jobs:
tar -zxvf server.tar.gz
cd release && sudo sh install.sh
- name: checkout
uses: actions/checkout@v3

- name: shell
run: |
cat >start.sh<<EOF
Expand All @@ -122,7 +120,15 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
cache-dependency-path: driver-go/go.sum
cache-dependency-path: go.sum

- name: Test
run: cd ./driver-go && go test -v ./...
run: sudo go test -v --count=1 -coverprofile=coverage.txt -covermode=atomic ./...

- name: Upload coverage to Codecov
if: ${{ matrix.go }} == 'stable'
uses: codecov/codecov-action@v4-beta
with:
files: ./coverage.txt
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}

0 comments on commit 82b81c6

Please sign in to comment.