Skip to content

Commit

Permalink
Merge pull request #370 from taosdata/3.0
Browse files Browse the repository at this point in the history
merge 3.0 to main
  • Loading branch information
huskar-t authored Dec 17, 2024
2 parents 5bbbbe6 + 156956d commit 42de6d8
Show file tree
Hide file tree
Showing 202 changed files with 39,685 additions and 7,047 deletions.
129 changes: 124 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
needs: build
strategy:
matrix:
go: [ '1.17', '1.20' ]
go: [ '1.17', 'stable' ]
name: Build taosAdapter ${{ matrix.go }}
steps:
- name: get cache server by pr
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
needs: build
strategy:
matrix:
go: [ '1.17', '1.20' ]
go: [ '1.17', 'stable' ]
name: test taosAdapter ${{ matrix.go }}
steps:
- name: get cache server by pr
Expand Down Expand Up @@ -249,15 +249,134 @@ jobs:
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
- uses: actions/upload-artifact@v4
if: always() && (steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled')
with:
name: ${{ runner.os }}-${{ matrix.go }}-log
path: /var/log/taos/
path: /var/log/taos/

golangci:
name: lint
runs-on: ubuntu-latest
needs: build
steps:
- name: get cache server by pr
if: github.event_name == 'pull_request'
id: get-cache-server-pr
uses: actions/cache@v4
with:
path: server.tar.gz
key: ${{ runner.os }}-build-${{ github.base_ref }}-${{ needs.build.outputs.commit_id }}
restore-keys: |
${{ runner.os }}-build-${{ github.base_ref }}-
- name: get cache server by push
if: github.event_name == 'push'
id: get-cache-server-push
uses: actions/cache@v4
with:
path: server.tar.gz
key: ${{ runner.os }}-build-${{ github.ref_name }}-${{ needs.build.outputs.commit_id }}
restore-keys: |
${{ runner.os }}-build-${{ github.ref_name }}-
- name: get cache server manually
if: github.event_name == 'workflow_dispatch'
id: get-cache-server-manually
uses: actions/cache@v4
with:
path: server.tar.gz
key: ${{ runner.os }}-build-${{ inputs.tbBranch }}-${{ needs.build.outputs.commit_id }}
restore-keys: |
${{ runner.os }}-build-${{ inputs.tbBranch }}-
- name: install
run: |
tar -zxvf server.tar.gz
cd release && sudo sh install.sh
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0

test_go_asan:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
go: [ 'stable' ]
name: test taosAdapter with asan ${{ matrix.go }}
steps:
- name: get cache server by pr
if: github.event_name == 'pull_request'
id: get-cache-server-pr
uses: actions/cache@v4
with:
path: server.tar.gz
key: ${{ runner.os }}-build-${{ github.base_ref }}-${{ needs.build.outputs.commit_id }}
restore-keys: |
${{ runner.os }}-build-${{ github.base_ref }}-
- name: get cache server by push
if: github.event_name == 'push'
id: get-cache-server-push
uses: actions/cache@v4
with:
path: server.tar.gz
key: ${{ runner.os }}-build-${{ github.ref_name }}-${{ needs.build.outputs.commit_id }}
restore-keys: |
${{ runner.os }}-build-${{ github.ref_name }}-
- name: get cache server manually
if: github.event_name == 'workflow_dispatch'
id: get-cache-server-manually
uses: actions/cache@v4
with:
path: server.tar.gz
key: ${{ runner.os }}-build-${{ inputs.tbBranch }}-${{ needs.build.outputs.commit_id }}
restore-keys: |
${{ runner.os }}-build-${{ inputs.tbBranch }}-
- name: install
run: |
tar -zxvf server.tar.gz
cd release && sudo sh install.sh
- name: checkout
uses: actions/checkout@v4

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

- name: start shell
run: |
cat >start.sh<<EOF
ulimit -n 65535 && TAOS_SUPPORT_VNODES=256 taosd
EOF
- name: start taosd
run: nohup sudo sh ./start.sh & disown

- name: test
id: test
run: sudo go test -v --count=1 -asan ./...
Loading

0 comments on commit 42de6d8

Please sign in to comment.