[FEAT] Diff & Merge Table #471
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| paths-ignore: | |
| - 'README.md' | |
| - 'demo/**' | |
| jobs: | |
| quality: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up environment | |
| uses: ./.github/actions/setup-python-env | |
| with: | |
| python-version: '3.11' | |
| - name: Cache prek | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/prek | |
| key: prek-${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Run checks | |
| run: make check | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up environment | |
| uses: ./.github/actions/setup-python-env | |
| with: | |
| python-version: '3.11' | |
| - name: Build package | |
| run: make build | |
| - name: Verify build artifacts | |
| run: | | |
| ls -la dist/ | |
| # Verify both sdist and wheel are created | |
| test -f dist/*.tar.gz || (echo "Source distribution not found" && exit 1) | |
| test -f dist/*.whl || (echo "Wheel not found" && exit 1) | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| unit-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.11', '3.14'] | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up environment | |
| uses: ./.github/actions/setup-python-env | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Run unit tests | |
| run: | | |
| if [ "${{ env.RUNNER_DEBUG }}" = "true" ]; then | |
| log_level=DEBUG | |
| else | |
| log_level=INFO | |
| fi | |
| set -o pipefail | |
| uv run pytest tests/unit_tests/ -v --log-cli-level=${log_level} | tee pytest.log | |
| tail -n 1 pytest.log | grep '=======' | grep 'passed' |grep -q 'failed' && exit 1 || exit 0 | |
| - name: Run integration tests without any test mode | |
| run: | | |
| if [ "${{ env.RUNNER_DEBUG }}" = "true" ]; then | |
| log_level=DEBUG | |
| else | |
| log_level=INFO | |
| fi | |
| set -o pipefail | |
| uv run pytest tests/integration_tests/ -v --log-cli-level=${log_level} -k "not server and not embedded and not oceanbase" | tee pytest.log | |
| tail -n 1 pytest.log | grep '=======' | grep 'passed' |grep -q 'failed' && exit 1 || exit 0 | |
| integration-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false # Allow other jobs to continue if one fails | |
| matrix: | |
| test_mode: [embedded, server, oceanbase] | |
| steps: | |
| - name: Free disk space | |
| uses: kfir4444/free-disk-space@main | |
| with: | |
| tool-cache: false | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| swap-storage: true | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up environment | |
| uses: ./.github/actions/setup-python-env | |
| with: | |
| python-version: '3.11' | |
| - name: Start OceanBase container | |
| if: matrix.test_mode == 'oceanbase' | |
| uses: oceanbase/setup-oceanbase-ce@v1 | |
| with: | |
| image_name: 'oceanbase/oceanbase-ce' | |
| image_tag: '4.5.0.0-100000012025112711' | |
| mode: 'mini' | |
| sql_port: 10000 | |
| datafile_size: '20G' | |
| log_disk_size: '10G' | |
| tenant_name: 'mysql' | |
| init_sql: "ALTER SYSTEM ob_vector_memory_limit_percentage = 30; create user 'jtuser'@'%'; GRANT SELECT, INSERT, UPDATE, DELETE ON test.* TO 'jtuser'@'%'; FLUSH PRIVILEGES;" | |
| - name: Start seekdb server container | |
| if: matrix.test_mode == 'server' | |
| run: | | |
| docker run --name seekdb-server -p 2881:2881 -d oceanbase/seekdb:1.0.0.0-100000262025111218 | |
| sleep 15 | |
| docker logs seekdb-server | |
| - name: Run integration tests for ${{ matrix.test_mode }} | |
| env: | |
| CI: 1 | |
| SEEKDB_PATH: ${{ runner.temp }}/seekdb.db | |
| OB_PORT: 10000 | |
| SERVER_PORT: 2881 | |
| run: | | |
| # Run integration tests filtered by test mode | |
| if [ "${{ env.RUNNER_DEBUG }}" = "true" ]; then | |
| log_level=DEBUG | |
| else | |
| log_level=INFO | |
| fi | |
| set -o pipefail | |
| uv run pytest tests/integration_tests/ -v --log-cli-level=${log_level} -k "${{ matrix.test_mode }}" | tee pytest.log | |
| tail -n 1 pytest.log | grep '=======' | grep 'passed' | grep -q 'failed' && exit 1 || exit 0 |