Skip to content

Commit

Permalink
Merge pull request #236 from taosdata/ci/codecov-3.1
Browse files Browse the repository at this point in the history
ci: codecov
  • Loading branch information
huskar-t authored Jan 29, 2024
2 parents 6f95553 + 570a237 commit bd40cda
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 @@ -111,7 +111,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 @@ -134,11 +134,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 @@ -147,6 +142,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 @@ -163,7 +161,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 @@ -82,7 +82,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 @@ -94,11 +94,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 @@ -107,6 +102,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 @@ -123,7 +121,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 bd40cda

Please sign in to comment.