Skip to content

Commit

Permalink
split ci jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
whhe committed Jun 5, 2024
1 parent 1840021 commit 9d3ffb9
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/ci-oceanbase-ce.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,45 @@ on:
- 'oceanbase-ce/**'

jobs:
test:
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: oceanbase-ce.tar

- name: Load Docker image
run: docker load --input 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()'
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'

0 comments on commit 9d3ffb9

Please sign in to comment.