Skip to content

Commit

Permalink
Merge pull request #255 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 341d110 + a5f2279 commit 4487329
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,18 +234,16 @@ jobs:
- name: checkout
uses: actions/checkout@v3
with:
path: 'taosadapter'

- name: copy taos cfg
run: |
sudo mkdir -p /etc/taos
sudo cp ./taosadapter/.github/workflows/taos.cfg /etc/taos/taos.cfg
sudo cp ./.github/workflows/taos.cfg /etc/taos/taos.cfg
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
cache-dependency-path: taosadapter/go.sum
cache-dependency-path: go.sum

- name: start shell
run: |
Expand All @@ -258,7 +256,15 @@ jobs:

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

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

- uses: actions/upload-artifact@v3
if: always() && (steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled')
Expand Down

0 comments on commit 4487329

Please sign in to comment.