Skip to content

Merge pull request #2 from oceanbase/obgeo #11

Merge pull request #2 from oceanbase/obgeo

Merge pull request #2 from oceanbase/obgeo #11

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install Poetry
run: |
pip install poetry
- name: Install dependencies
run: |
poetry install
- name: Run Docker container
run: |
docker run --name ob433 -e MODE=slim -p 2881:2881 -d quay.io/oceanbase/oceanbase-ce:4.3.3.0-100000142024101215
- name: Wait for container to be ready
run: |
timeout=300
while [ $timeout -gt 0 ]; do
if docker logs ob433 | grep -q 'boot success!'; then
echo "Container is ready."
break
fi
sleep 5
timeout=$((timeout - 5))
done
if [ $timeout -le 0 ]; then
echo "Container did not start in time!"
exit 1
fi
- name: Execute Initialize SQL Command
env:
OCEANBASE_HOST: '127.0.0.1'
OCEANBASE_PORT: '2881'
OCEANBASE_USER: 'root@test'
OCEANBASE_PASS: ''
run: |
docker exec ob433 obclient -h $OCEANBASE_HOST -P $OCEANBASE_PORT -u $OCEANBASE_USER -p$OCEANBASE_PASS -e "ALTER SYSTEM ob_vector_memory_limit_percentage = 30"
- name: Run tests
run: |
poetry run pytest --log-cli-level=INFO