-
Notifications
You must be signed in to change notification settings - Fork 7
69 lines (58 loc) · 1.75 KB
/
test-oceanbase-ce.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: test oceanbase-ce
on:
push:
paths:
- '.github/workflows/test-oceanbase-ce.yml'
- 'oceanbase-ce/**'
pull_request:
paths:
- '.github/workflows/test-oceanbase-ce.yml'
- 'oceanbase-ce/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build observer image
uses: docker/build-push-action@v2
with:
context: ./oceanbase-ce
platforms: linux/amd64
file: ./oceanbase-ce/Dockerfile
push: false
tags: oceanbase-ce
build-args: |
VERSION=${{ vars.TEST_OCEANBASE_VERSION }}
- 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
container_name: ob-slim
fastboot: false
- name: Test Docker container
run: |
docker exec ob-slim obclient -h127.0.0.1 -P2881 -uroot -e 'select version()'
docker exec ob-slim obclient -h127.0.0.1 -P2881 -uroot@test -e 'show databases'