From 85127d0834365e3b9cdad82473c7bb49914a614c Mon Sep 17 00:00:00 2001 From: Fangyin Cheng Date: Sat, 2 Nov 2024 23:52:42 +0800 Subject: [PATCH] ci(test): Test build python tasks --- .github/workflows/release-python-task.yml | 27 ++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-python-task.yml b/.github/workflows/release-python-task.yml index 8c86276..d460bde 100644 --- a/.github/workflows/release-python-task.yml +++ b/.github/workflows/release-python-task.yml @@ -95,10 +95,17 @@ jobs: # Build lyric-py-worker cd ../lyric-py-worker - rye sync + # Setup virtualenv and install dependencies + python3 -m venv .venv + if [ "${{ matrix.os }}" = "windows-latest" ]; then + source .venv/Scripts/activate + else + source .venv/bin/activate + fi + pip install --upgrade pip + pip install -r app-requirements.txt # Install lyric-task pip install --force-reinstall ../dist/lyric_task-*.whl - pip install -r app-requirements.txt # Build wasm cd src componentize-py -d ./wit -w lyric-py-task componentize worker -o python_worker_fat.wasm @@ -106,6 +113,7 @@ jobs: rm python_worker_fat.wasm cd .. # Build wheel + rye sync --no-dev rye build # Build lyric-js-worker @@ -159,10 +167,13 @@ jobs: # Build lyric-py-worker cd ../lyric-py-worker - rye sync + # Setup virtualenv and install dependencies + python3 -m venv .venv + source .venv/bin/activate + pip install --upgrade pip + pip install -r app-requirements.txt # Install lyric-task pip install --force-reinstall ../dist/lyric_task-*.whl - pip install -r app-requirements.txt # Build wasm cd src componentize-py -d ./wit -w lyric-py-task componentize worker -o python_worker_fat.wasm @@ -170,6 +181,7 @@ jobs: rm python_worker_fat.wasm cd .. # Build wheel + rye sync --no-dev rye build # Build lyric-js-worker @@ -219,7 +231,11 @@ jobs: # Build lyric-py-worker cd ../lyric-py-worker - rye sync --no-dev + # Setup virtualenv and install dependencies + python3 -m venv .venv + source .venv/bin/activate + pip install --upgrade pip + pip install -r app-requirements.txt # Install lyric-task pip install --force-reinstall ../dist/lyric_task-*.tar.gz # Build wasm @@ -229,6 +245,7 @@ jobs: rm python_worker_fat.wasm cd .. # Build sdist + rye sync --no-dev rye build --sdist # Build lyric-js-worker