diff --git a/.github/workflows/build-oceanbase-ce.yml b/.github/workflows/build-oceanbase-ce.yml deleted file mode 100644 index a82a105..0000000 --- a/.github/workflows/build-oceanbase-ce.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: build oceanbase-ce image - -on: - workflow_call: - inputs: - cache_key: - required: true - type: string - image_file: - required: true - type: string - version: - required: true - type: string - -jobs: - build-oceanbase-ce: - runs-on: ubuntu-latest - steps: - - name: Free disk space on Ubuntu runner - uses: kfir4444/free-disk-space@main - with: - tool-cache: false - android: true - dotnet: true - haskell: true - large-packages: true - swap-storage: true - - - name: Print environment variables - run: printenv - - - name: Check out repository code - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build pre image - uses: docker/build-push-action@v6 - with: - context: ./oceanbase-ce - platforms: linux/amd64 - file: ./oceanbase-ce/Dockerfile.pre - push: false - load: true - tags: oceanbase-ce-pre - build-args: | - VERSION=${{ inputs.version }} - - - name: Copy storage files - run: | - mkdir -p ./oceanbase-ce/share - docker run -v ./oceanbase-ce/share:/root/share oceanbase-ce-pre - - - name: Build observer image - uses: docker/build-push-action@v6 - with: - context: ./oceanbase-ce - platforms: linux/amd64 - file: ./oceanbase-ce/Dockerfile - push: false - load: true - tags: oceanbase-ce - build-args: | - VERSION=${{ inputs.version }} - - - name: Export Docker image - run: docker save -o ${{ inputs.image_file }} oceanbase-ce - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ inputs.cache_key }} - path: ${{ inputs.image_file }} diff --git a/.github/workflows/release-lts-oceanbase-ce.yml b/.github/workflows/release-lts-oceanbase-ce.yml index 39b0fc9..ebf30ec 100644 --- a/.github/workflows/release-lts-oceanbase-ce.yml +++ b/.github/workflows/release-lts-oceanbase-ce.yml @@ -6,93 +6,9 @@ on: - "lts-oceanbase-ce-[0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9]+" - "lts-oceanbase-[0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9]+" -env: - tagName: ${{ github.ref_name }} - jobs: - release-lts-oceanbase-ce: - runs-on: ubuntu-latest - steps: - - name: Free disk space on Ubuntu runner - uses: kfir4444/free-disk-space@main - with: - tool-cache: false - android: true - dotnet: true - haskell: true - large-packages: true - swap-storage: true - - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set Version variables - id: set_version_vars - run: echo "version=$(echo $tagName | grep -P '(\d*\.\d*\.\d*\.\d*-\d{18})' --only-matching)" >> $GITHUB_OUTPUT - - - name: Set LTS tag variables - id: set_lts_tag_vars - run: echo "lts_tag=$(echo $tagName | grep -P '(\d*\.\d*\.\d*)' --only-matching)" >> $GITHUB_OUTPUT - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to Docker hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Log in to Quay io - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ secrets.QUAY_IO_USERNAME }} - password: ${{ secrets.QUAY_IO_PASSWORD }} - - - name: Log in to Ghcr io - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build pre image - uses: docker/build-push-action@v6 - with: - context: ./oceanbase-ce - platforms: linux/amd64 - file: ./oceanbase-ce/Dockerfile.pre - push: false - load: true - tags: oceanbase-ce-pre - build-args: | - VERSION=${{ steps.set_version_vars.outputs.version }} - - - name: Copy storage files - run: | - mkdir -p ./oceanbase-ce/share - docker run -v ./oceanbase-ce/share:/root/share oceanbase-ce-pre - - - name: Build and push observer w/o cache - uses: docker/build-push-action@v6 - with: - context: ./oceanbase-ce - platforms: linux/amd64,linux/arm64 - file: ./oceanbase-ce/Dockerfile - push: true - tags: | - ${{ vars.DOCKER_PUSH_BASE }}/oceanbase-ce:${{ steps.set_version_vars.outputs.version }} - quay.io/${{ vars.QUAY_IO_PUSH_BASE }}/oceanbase-ce:${{ steps.set_version_vars.outputs.version }} - ghcr.io/${{ github.repository_owner }}/oceanbase-ce:${{ steps.set_version_vars.outputs.version }} - ${{ vars.DOCKER_PUSH_BASE }}/oceanbase-ce:${{ steps.set_lts_tag_vars.outputs.lts_tag }}-lts - quay.io/${{ vars.QUAY_IO_PUSH_BASE }}/oceanbase-ce:${{ steps.set_lts_tag_vars.outputs.lts_tag }}-lts - ghcr.io/${{ github.repository_owner }}/oceanbase-ce:${{ steps.set_lts_tag_vars.outputs.lts_tag }}-lts - ${{ vars.DOCKER_PUSH_BASE }}/oceanbase-ce:latest - quay.io/${{ vars.QUAY_IO_PUSH_BASE }}/oceanbase-ce:latest - ghcr.io/${{ github.repository_owner }}/oceanbase-ce:latest - build-args: | - VERSION=${{ steps.set_version_vars.outputs.version }} + release: + uses: ./.github/workflows/reusable-test-and-release-oceanbase-ce.yml + with: + tag_name: ${{ github.ref_name }} + lts: true diff --git a/.github/workflows/release-oceanbase-ce.yml b/.github/workflows/release-oceanbase-ce.yml index 5c1006f..931d2bf 100644 --- a/.github/workflows/release-oceanbase-ce.yml +++ b/.github/workflows/release-oceanbase-ce.yml @@ -6,83 +6,9 @@ on: - "oceanbase-ce-[0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9]+" - "oceanbase-[0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9]+" -env: - tagName: ${{ github.ref_name }} - jobs: - release-oceanbase-ce: - runs-on: ubuntu-latest - steps: - - name: Free disk space on Ubuntu runner - uses: kfir4444/free-disk-space@main - with: - tool-cache: false - android: true - dotnet: true - haskell: true - large-packages: true - swap-storage: true - - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set Version variables - id: set_version_vars - run: echo "version=$(echo $tagName | grep -P '(\d*\.\d*\.\d*\.\d*-\d{18})' --only-matching)" >> $GITHUB_OUTPUT - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to Docker hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Log in to Quay io - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ secrets.QUAY_IO_USERNAME }} - password: ${{ secrets.QUAY_IO_PASSWORD }} - - - name: Log in to Ghcr io - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build pre image - uses: docker/build-push-action@v6 - with: - context: ./oceanbase-ce - platforms: linux/amd64 - file: ./oceanbase-ce/Dockerfile.pre - push: false - load: true - tags: oceanbase-ce-pre - build-args: | - VERSION=${{ steps.set_version_vars.outputs.version }} - - - name: Copy storage files - run: | - mkdir -p ./oceanbase-ce/share - docker run -v ./oceanbase-ce/share:/root/share oceanbase-ce-pre - - - name: Build and push observer w/o cache - uses: docker/build-push-action@v6 - with: - context: ./oceanbase-ce - platforms: linux/amd64,linux/arm64 - file: ./oceanbase-ce/Dockerfile - push: true - tags: | - ${{ vars.DOCKER_PUSH_BASE }}/oceanbase-ce:${{ steps.set_version_vars.outputs.version }} - quay.io/${{ vars.QUAY_IO_PUSH_BASE }}/oceanbase-ce:${{ steps.set_version_vars.outputs.version }} - ghcr.io/${{ github.repository_owner }}/oceanbase-ce:${{ steps.set_version_vars.outputs.version }} - build-args: | - VERSION=${{ steps.set_version_vars.outputs.version }} + release: + uses: ./.github/workflows/reusable-test-and-release-oceanbase-ce.yml + with: + tag_name: ${{ github.ref_name }} + lts: false diff --git a/.github/workflows/reusable-build-and-release-oceanbase-ce.yml b/.github/workflows/reusable-build-and-release-oceanbase-ce.yml new file mode 100644 index 0000000..6330323 --- /dev/null +++ b/.github/workflows/reusable-build-and-release-oceanbase-ce.yml @@ -0,0 +1,133 @@ +name: build and release oceanbase-ce + +on: + workflow_call: + inputs: + version: + required: true + type: string + cache_key: + required: false + type: string + push-images: + required: false + type: boolean + push-lts-images: + required: false + type: boolean + +jobs: + build-and-release: + runs-on: ubuntu-latest + steps: + - name: Free disk space on Ubuntu runner + uses: kfir4444/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: true + haskell: true + large-packages: true + swap-storage: true + + - name: Print environment variables + run: printenv + + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build pre image + uses: docker/build-push-action@v6 + with: + context: ./oceanbase-ce + platforms: linux/amd64 + file: ./oceanbase-ce/Dockerfile.pre + push: false + load: true + tags: oceanbase-ce-pre + build-args: | + VERSION=${{ inputs.version }} + + - name: Copy storage files + run: | + mkdir -p ./oceanbase-ce/share + docker run -v ./oceanbase-ce/share:/root/share oceanbase-ce-pre + + - name: Build observer image + if: ${{ inputs.push-images == false }} + run: | + cd oceanbase-ce + docker buildx build --build-arg VERSION=${{ inputs.version }} --platform linux/amd64 -t oceanbase-ce:amd64 --load --output type=docker,dest=./oceanbase-ce-amd64.tar . + docker buildx build --build-arg VERSION=${{ inputs.version }} --platform linux/arm64 -t oceanbase-ce:arm64 --load --output type=docker,dest=./oceanbase-ce-arm64.tar . + + - name: Upload artifact + if: ${{ inputs.push-images == false }} + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.cache_key }} + path: oceanbase-ce/oceanbase-ce-**.tar + + - name: Log in to Docker hub + if: ${{ inputs.push-images }} + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Log in to Quay io + if: ${{ inputs.push-images }} + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.QUAY_IO_USERNAME }} + password: ${{ secrets.QUAY_IO_PASSWORD }} + + - name: Log in to Ghcr io + if: ${{ inputs.push-images }} + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set image tags + if: ${{ inputs.push-images }} + id: set_image_tags + run: | + image_tags="ghcr.io/${{ github.repository_owner }}/oceanbase-ce:${{ inputs.version }}" + image_tags="${image_tags}, ${{ env.DOCKER_PUSH_BASE }}/oceanbase-ce:${{ inputs.version }}" + image_tags="${image_tags}, quay.io/${{ env.QUAY_IO_PUSH_BASE }}/oceanbase-ce:${{ inputs.version }}" + + if [[ "${{ inputs.push-lts-images }}" == "true" ]]; then + lts_version="$(echo ${{ inputs.version }} | grep -P '(\d*\.\d*\.\d*)' --only-matching)" + lts_tag="${lts_version}-lts" + + image_tags="${image_tags}, ghcr.io/${{ github.repository_owner }}/oceanbase-ce:${lts_tag}" + image_tags="${image_tags}, ${{ env.DOCKER_PUSH_BASE }}/oceanbase-ce:${lts_tag}" + image_tags="${image_tags}, quay.io/${{ env.QUAY_IO_PUSH_BASE }}/oceanbase-ce:${lts_tag}" + + image_tags="${image_tags}, ghcr.io/${{ github.repository_owner }}/oceanbase-ce:latest" + image_tags="${image_tags}, ${{ vars.DOCKER_PUSH_BASE }}/oceanbase-ce:latest" + image_tags="${image_tags}, quay.io/${{ vars.QUAY_IO_PUSH_BASE }}/oceanbase-ce:latest" + fi + + echo "image tags: ${image_tags}" + echo "tags=${image_tags}" >> $GITHUB_OUTPUT + + - name: Build and push observer image + if: ${{ inputs.push-images }} + uses: docker/build-push-action@v6 + with: + context: ./oceanbase-ce + platforms: linux/amd64,linux/arm64 + file: ./oceanbase-ce/Dockerfile + push: true + tags: ${{ steps.set_image_tags.outputs.tags }} + build-args: | + VERSION=${{ inputs.version }} diff --git a/.github/workflows/reusable-build-and-test-oceanbase-ce.yml b/.github/workflows/reusable-build-and-test-oceanbase-ce.yml new file mode 100644 index 0000000..7bcbcc2 --- /dev/null +++ b/.github/workflows/reusable-build-and-test-oceanbase-ce.yml @@ -0,0 +1,47 @@ +name: build and test oceanbase-ce + +on: + workflow_call: + inputs: + cache_key: + required: true + type: string + version: + required: true + type: string + +jobs: + build: + uses: ./.github/workflows/reusable-build-and-release-oceanbase-ce.yml + with: + cache_key: ${{ inputs.cache_key }} + version: ${{ inputs.version }} + push-images: false + push-lts-images: false + + test-slim: + needs: build + uses: ./.github/workflows/reusable-test-oceanbase-ce.yml + with: + cache_key: ${{ inputs.cache_key }} + mode: slim + port: 1234 + test_password: 123456 + init_sql: "USE test; + CREATE TABLE user(id INT(10) PRIMARY KEY, name VARCHAR(20)); + INSERT INTO user VALUES (1, 'tom'), (2, 'jerry');" + + test-mini: + needs: build + uses: ./.github/workflows/reusable-test-oceanbase-ce.yml + with: + cache_key: ${{ inputs.cache_key }} + cluster_name: github-action + mode: mini + port: 1234 + sys_password: 1234567 + test_tenant: mini + test_password: 7654321 + init_sql: "USE test; + CREATE TABLE user(id INT(10) PRIMARY KEY, name VARCHAR(20)); + INSERT INTO user VALUES (1, 'tom'), (2, 'jerry');" diff --git a/.github/workflows/reusable-build-oblogproxy-ce.yml b/.github/workflows/reusable-build-oblogproxy-ce.yml new file mode 100644 index 0000000..5078a70 --- /dev/null +++ b/.github/workflows/reusable-build-oblogproxy-ce.yml @@ -0,0 +1,49 @@ +name: build oblogproxy-ce image + +on: + workflow_call: + inputs: + cache_key: + required: true + type: string + version: + required: false + type: string + +jobs: + build-oblogproxy-ce-image: + runs-on: ubuntu-latest + steps: + - name: Free disk space on Ubuntu runner + uses: kfir4444/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: true + haskell: true + large-packages: true + swap-storage: true + + - name: Print environment variables + run: printenv + + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build oblogproxy-ce image + run: | + cd oblogproxy-ce + docker buildx build --build-arg VERSION=${{ inputs.version }} --platform linux/amd64 -t oblogproxy-ce:amd64 --load --output type=docker,dest=./oblogproxy-ce-amd64.tar . + docker buildx build --build-arg VERSION=${{ inputs.version }} --platform linux/arm64 -t oblogproxy-ce:arm64 --load --output type=docker,dest=./oblogproxy-ce-arm64.tar . + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.cache_key }} + path: oblogproxy-ce/oblogproxy-ce-**.tar diff --git a/.github/workflows/reusable-test-and-release-oceanbase-ce.yml b/.github/workflows/reusable-test-and-release-oceanbase-ce.yml new file mode 100644 index 0000000..82f3aa4 --- /dev/null +++ b/.github/workflows/reusable-test-and-release-oceanbase-ce.yml @@ -0,0 +1,36 @@ +name: test and release oceanbase-ce + +on: + workflow_call: + inputs: + tag_name: + required: true + type: string + lts: + required: true + type: boolean + +jobs: + set-version: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.set_version_vars.outputs.version }} + steps: + - name: Set Version variables + id: set_version_vars + run: echo "version=$(echo ${{ inputs.tag_name }} | grep -P '(\d*\.\d*\.\d*\.\d*-\d{18})' --only-matching)" >> $GITHUB_OUTPUT + + build-and-test: + uses: ./.github/workflows/reusable-build-and-test-oceanbase-ce.yml + needs: set-version + with: + cache_key: release-oceanbase-ce + version: ${{ needs.set-version.outputs.version }} + + release: + uses: ./.github/workflows/reusable-build-and-release-oceanbase-ce.yml + needs: [ set-version, build-and-test ] + with: + version: ${{ needs.set-version.outputs.version }} + push-images: true + push-lts-images: ${{ inputs.lts }} diff --git a/.github/workflows/java-test-oceanbase-ce.yml b/.github/workflows/reusable-test-oceanbase-ce.yml similarity index 94% rename from .github/workflows/java-test-oceanbase-ce.yml rename to .github/workflows/reusable-test-oceanbase-ce.yml index c5202fe..a4f31ee 100644 --- a/.github/workflows/java-test-oceanbase-ce.yml +++ b/.github/workflows/reusable-test-oceanbase-ce.yml @@ -1,4 +1,4 @@ -name: java test oceanbase-ce +name: test oceanbase-ce on: workflow_call: @@ -6,9 +6,6 @@ on: cache_key: required: true type: string - image_file: - required: true - type: string mode: required: true type: string @@ -50,6 +47,9 @@ jobs: large-packages: true swap-storage: true + - name: Checkout repository + uses: actions/checkout@v4 + - name: Download artifact uses: actions/download-artifact@v4 with: @@ -57,12 +57,15 @@ jobs: path: /tmp - name: Load Docker image - run: docker load -i /tmp/${{ inputs.image_file }} + run: | + docker load -i /tmp/oceanbase-ce-amd64.tar + rm -f /tmp/oceanbase-ce-amd64.tar - name: Start Docker container uses: oceanbase/setup-oceanbase-ce@v1 with: image_name: oceanbase-ce + image_tag: amd64 container_name: oceanbase-ce mode: ${{ inputs.mode }} cluster_name: ${{ inputs.cluster_name }} @@ -85,9 +88,6 @@ jobs: echo "server_ip=$container_ip" >> $GITHUB_OUTPUT fi - - name: Checkout repository - uses: actions/checkout@v4 - - name: Set up Java uses: actions/setup-java@v4 with: diff --git a/.github/workflows/test-oblogproxy-ce.yml b/.github/workflows/test-oblogproxy-ce.yml index fb458ff..1d410c6 100644 --- a/.github/workflows/test-oblogproxy-ce.yml +++ b/.github/workflows/test-oblogproxy-ce.yml @@ -3,13 +3,8 @@ name: test oblogproxy-ce on: pull_request: paths: - - '.github/workflows/**-oblogproxy-ce.yml' - - '.github/workflows/build-oceanbase-ce.yml' - - 'oblogproxy-ce/Dockerfile' - - 'oblogproxy-ce/**.sh' - - 'oceanbase-ce/Dockerfile' - - 'oceanbase-ce/**.sh' - - 'oceanbase-ce/**.yaml' + - '.github/workflows/*oblogproxy-ce*.yml' + - 'oblogproxy-ce/**' - 'test/**/LogProxyCETest.java' concurrency: @@ -17,73 +12,41 @@ concurrency: cancel-in-progress: true jobs: - build-oceanbase-ce: - uses: ./.github/workflows/build-oceanbase-ce.yml - with: - cache_key: test-oblogproxy-ce_oceanbase-ce - image_file: oceanbase-ce.tar - version: 4.2.1.8-108000022024072217 - build-oblogproxy-ce: - runs-on: ubuntu-latest - steps: - - name: Clean tool cache - run: sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - - name: Print environment variables - run: printenv - - - name: Check out repository code - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build oblogproxy-ce image - uses: docker/build-push-action@v6 - with: - context: ./oblogproxy-ce - platforms: linux/amd64 - file: ./oblogproxy-ce/Dockerfile - push: false - load: true - tags: oblogproxy-ce - - - name: Export Docker image - run: docker save -o oblogproxy-ce.tar oblogproxy-ce - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: test-oblogproxy-ce_oblogproxy-ce - path: oblogproxy-ce.tar + uses: ./.github/workflows/reusable-build-oblogproxy-ce.yml + with: + cache_key: test-oblogproxy-ce test-oblogproxy-ce: runs-on: ubuntu-latest - needs: [ build-oceanbase-ce, build-oblogproxy-ce ] + needs: [ build-oblogproxy-ce ] steps: - - name: Clean tool cache - run: sudo rm -rf "$AGENT_TOOLSDIRECTORY" + - name: Free disk space on Ubuntu runner + uses: kfir4444/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: true + haskell: true + large-packages: true + swap-storage: true - name: Download artifact uses: actions/download-artifact@v4 with: - pattern: test-oblogproxy-ce_** + name: test-oblogproxy-ce path: /tmp - name: Load Docker image run: | - docker load -i /tmp/test-oblogproxy-ce_oceanbase-ce/oceanbase-ce.tar - docker load -i /tmp/test-oblogproxy-ce_oblogproxy-ce/oblogproxy-ce.tar - sudo rm -rf /tmp/* + docker load -i /tmp/oblogproxy-ce-amd64.tar + rm -f /tmp/oblogproxy-ce-**.tar - name: Start oceanbase-ce container uses: oceanbase/setup-oceanbase-ce@v1 with: - image_name: oceanbase-ce + image_name: oceanbase/oceanbase-ce + image_tag: 4.2.1.8-108000022024072217 container_name: oceanbase-ce sql_port: 12881 rpc_port: 12882 @@ -92,7 +55,7 @@ jobs: tenant_root_password: 654321 - name: Start oblogproxy-ce container - run: docker run --name oblogproxy-ce -e OB_SYS_USERNAME=root -e OB_SYS_PASSWORD=123456 -p 12983:2983 -d oblogproxy-ce + run: docker run --name oblogproxy-ce -e OB_SYS_USERNAME=root -e OB_SYS_PASSWORD=123456 -p 12983:2983 -d oblogproxy-ce:amd64 - name: Set container IP id: set_container_ip diff --git a/.github/workflows/test-oceanbase-ce.yml b/.github/workflows/test-oceanbase-ce.yml index 42bae9c..a63188f 100644 --- a/.github/workflows/test-oceanbase-ce.yml +++ b/.github/workflows/test-oceanbase-ce.yml @@ -3,10 +3,8 @@ name: test oceanbase-ce on: pull_request: paths: - - '.github/workflows/**-oceanbase-ce.yml' - - 'oceanbase-ce/Dockerfile' - - 'oceanbase-ce/**.sh' - - 'oceanbase-ce/**.yaml' + - '.github/workflows/*oceanbase-ce*.yml' + - 'oceanbase-ce/**' - 'test/**/OceanBaseCETest.java' concurrency: @@ -14,38 +12,8 @@ concurrency: cancel-in-progress: true jobs: - build: - uses: ./.github/workflows/build-oceanbase-ce.yml + build-and-test: + uses: ./.github/workflows/reusable-build-and-test-oceanbase-ce.yml with: cache_key: test-oceanbase-ce - image_file: oceanbase-ce.tar version: 4.3.2.0-100000092024072912 - - test-slim: - needs: build - uses: ./.github/workflows/java-test-oceanbase-ce.yml - with: - cache_key: test-oceanbase-ce - image_file: oceanbase-ce.tar - mode: slim - port: 1234 - test_password: 123456 - init_sql: "USE test; - CREATE TABLE user(id INT(10) PRIMARY KEY, name VARCHAR(20)); - INSERT INTO user VALUES (1, 'tom'), (2, 'jerry');" - - test-mini: - needs: build - uses: ./.github/workflows/java-test-oceanbase-ce.yml - with: - cache_key: test-oceanbase-ce - image_file: oceanbase-ce.tar - cluster_name: github-action - mode: mini - port: 1234 - sys_password: 1234567 - test_tenant: mini - test_password: 7654321 - init_sql: "USE test; - CREATE TABLE user(id INT(10) PRIMARY KEY, name VARCHAR(20)); - INSERT INTO user VALUES (1, 'tom'), (2, 'jerry');"