Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ jobs:
uses: matrixorigin/CI/actions/seed-go-caches@main
with:
flavor: race
- name: Prepare Python UDF contract tests
if: ${{ hashFiles('pkg/udf/python/worker/requirements.txt') != '' }}
timeout-minutes: 5
uses: matrixorigin/CI/actions/setup-python-udf@main
- name: Unit Testing
id: ut
run: |
Expand Down Expand Up @@ -565,6 +569,10 @@ jobs:
echo "bucket=${{ secrets.S3BUCKET }}" >> $GITHUB_ENV
# set ut workdir
echo "UT_WORKDIR=${{ github.workspace }}" >> $GITHUB_ENV
- name: Prepare Python UDF contract tests
if: ${{ hashFiles('pkg/udf/python/worker/requirements.txt') != '' }}
timeout-minutes: 5
uses: matrixorigin/CI/actions/setup-python-udf@main
- name: Unit Testing
run: |
cd $GITHUB_WORKSPACE && make clean && make config
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/coverage-ut.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ jobs:
with:
setup-java: true
go-version-file: "${{ github.workspace }}/go.mod"
- name: Prepare Python UDF contract tests
if: ${{ hashFiles('pkg/udf/python/worker/requirements.txt') != '' }}
timeout-minutes: 5
uses: matrixorigin/CI/actions/setup-python-udf@main
- name: Checkout CI coverage helper
timeout-minutes: 5
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
Expand Down
20 changes: 20 additions & 0 deletions actions/setup-python-udf/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Set up Python UDF tests
description: Install the checked-out MatrixOne worker contract for host Go tests
runs:
using: composite
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install worker dependencies in a job-owned environment
shell: bash
run: |
set -euo pipefail
udf_venv=$(mktemp -d "$RUNNER_TEMP/python-udf.XXXXXX")
python3 -m venv "$udf_venv"
"$udf_venv/bin/python3" -m pip install --disable-pip-version-check --only-binary=:all: \
--retries 2 --timeout 30 -r pkg/udf/python/worker/requirements.txt
"$udf_venv/bin/python3" -c 'import sys, pyarrow, pyarrow.flight; print(sys.executable, pyarrow.__version__, pyarrow.__file__)'
# Go tests resolve python3 from PATH; child workers must inherit exactly
# the interpreter into which this step installed the pinned requirements.
echo "$udf_venv/bin" >> "$GITHUB_PATH"