test: add Java test cases for oceanbase-ce #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test oceanbase-ce | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/test-oceanbase-ce.yml' | |
- 'oceanbase-ce/**' | |
- 'test/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Build Docker image | |
run: ./oceanbase-ce/docker_build.sh | |
- name: Export Docker image | |
run: docker save -o oceanbase-ce.tar oceanbase-ce | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: oceanbase-ce | |
path: oceanbase-ce.tar | |
test-slim: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: oceanbase-ce | |
path: /tmp | |
- name: Load Docker image | |
run: docker load -i /tmp/oceanbase-ce.tar | |
- name: Start Docker container | |
uses: oceanbase/setup-oceanbase-ce@v1 | |
with: | |
image_name: oceanbase-ce | |
cluster_name: docker-images-test | |
sql_port: 1234 | |
rpc_port: 5678 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
distribution: 'zulu' | |
- name: Test Docker container | |
env: | |
host: 127.0.0.1 | |
port: 1234 | |
sys_username: root | |
sys_password: '' | |
test_tenant: test | |
test_username: root@test | |
test_password: '' | |
cluster_name: docker-images-test | |
server_ip: 127.0.0.1 | |
rs_list: 127.0.0.1:2882:2881 | |
run: | | |
cd test | |
mvn verify |