Skip to content

test: add Java test cases for oceanbase-ce #45

test: add Java test cases for oceanbase-ce

test: add Java test cases for oceanbase-ce #45

name: test oceanbase-ce
on:
push:
branches: [ main ]
pull_request:
paths:
- '.github/workflows/**-oceanbase-ce.yml'
- 'oceanbase-ce/**'
- 'test/**'
concurrency:
group: test-oceanbase-ce-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- 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 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=4.2.3.1-101000032024061316
- 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:
needs: build
uses: ./.github/workflows/java-test-oceanbase-ce.yml
with:
cache_key: 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: 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');"