From 94a5328fa09b211e5851c98aadfeb88617d73ff6 Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Tue, 27 Jan 2026 14:18:07 +0800 Subject: [PATCH] ci: run database connector tests for every PR (#7612) * ci: run database connector tests for every PR * ci: correct yaml * chore: revert format * chore: include a dummy change to trigger github actions * Revert "chore: include a dummy change to trigger github actions" This reverts commit 599e23dd8ea30de844d434f910a4792f51b75854. * chore: correct yaml * ci: correct ci config * Update .github/workflows/develop.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/develop.yml | 9 ++++ .github/workflows/multi-lang-tests.yml | 57 ---------------------- .github/workflows/run-multi-lang-tests.yml | 27 +++------- 3 files changed, 16 insertions(+), 77 deletions(-) delete mode 100644 .github/workflows/multi-lang-tests.yml diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index cf5434a998..416c813e8d 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -845,6 +845,15 @@ jobs: fail_ci_if_error: false verbose: true + run-multi-lang-tests: + if: ${{ github.repository == 'GreptimeTeam/greptimedb' }} + name: Run Multi-language SDK Tests + needs: build + uses: ./.github/workflows/run-multi-lang-tests.yml + with: + artifact-name: bins + + # compat: # if: ${{ github.repository == 'GreptimeTeam/greptimedb' }} # name: Compatibility Test diff --git a/.github/workflows/multi-lang-tests.yml b/.github/workflows/multi-lang-tests.yml deleted file mode 100644 index 6da0a658dd..0000000000 --- a/.github/workflows/multi-lang-tests.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Multi-language Integration Tests - -on: - push: - branches: - - main - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - build-greptimedb: - if: ${{ github.repository == 'GreptimeTeam/greptimedb' }} - name: Build GreptimeDB binary - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - uses: Swatinem/rust-cache@v2 - with: - shared-key: "multi-lang-build" - cache-all-crates: "true" - save-if: ${{ github.ref == 'refs/heads/main' }} - - name: Install cargo-gc-bin - shell: bash - run: cargo install cargo-gc-bin --force - - name: Build greptime binary - shell: bash - run: cargo gc -- --bin greptime --features "pg_kvbackend,mysql_kvbackend" - - name: Pack greptime binary - shell: bash - run: | - mkdir bin && \ - mv ./target/debug/greptime bin - - name: Print greptime binary info - run: ls -lh bin - - name: Upload greptime binary - uses: actions/upload-artifact@v4 - with: - name: greptime-bin - path: bin/ - retention-days: 1 - - run-multi-lang-tests: - name: Run Multi-language SDK Tests - needs: build-greptimedb - uses: ./.github/workflows/run-multi-lang-tests.yml - with: - artifact-name: greptime-bin diff --git a/.github/workflows/run-multi-lang-tests.yml b/.github/workflows/run-multi-lang-tests.yml index f744d7a644..378329ed23 100644 --- a/.github/workflows/run-multi-lang-tests.yml +++ b/.github/workflows/run-multi-lang-tests.yml @@ -68,26 +68,13 @@ jobs: uses: actions/download-artifact@v4 with: name: ${{ inputs.artifact-name }} - path: artifact + path: . - - name: Setup greptime binary - run: | - mkdir -p bin - if [ "${{ inputs.artifact-is-tarball }}" = "true" ]; then - # Extract tarball and find greptime binary - tar -xzf artifact/*.tar.gz -C artifact - find artifact -name "greptime" -type f -exec cp {} bin/greptime \; - else - # Direct binary format - if [ -f artifact/greptime ]; then - cp artifact/greptime bin/greptime - else - cp artifact/* bin/greptime - fi - fi - chmod +x ./bin/greptime - ls -lh ./bin/greptime - ./bin/greptime --version + - name: Unzip binaries + run: tar -xvf ./${{ inputs.artifact-name }}.tar.gz + + - name: Print greptime binary info + run: ls -lh ${{ inputs.artifact-name }} && file ${{ inputs.artifact-name }}/greptime - name: Setup Java 17 uses: actions/setup-java@v4 @@ -133,7 +120,7 @@ jobs: - name: Start GreptimeDB standalone run: | - ./bin/greptime standalone start \ + ./bins/greptime standalone start \ --http-addr 0.0.0.0:${{ inputs.http-port }} \ --rpc-addr 0.0.0.0:4001 \ --mysql-addr 0.0.0.0:${{ inputs.mysql-port }} \