Skip to content

Commit 244b7c1

Browse files
authored
Refactor virtual environment setup in action.yml
Updated virtual environment creation to overwrite existing ones and removed redundant cleanup steps.
1 parent cfafaab commit 244b7c1

File tree

1 file changed

+4
-29
lines changed

1 file changed

+4
-29
lines changed

.github/actions/build_bindings_python/action.yml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,8 @@ runs:
8080
# Install cargo-zigbuild manually to avoid musl target issues
8181
cargo install cargo-zigbuild --target ${{ inputs.target }}
8282
../../scripts/setup/dev_setup.sh -yb
83-
# Clean up any existing virtual environment
84-
rm -rf .venv || true
85-
uv venv --python=python3.12
83+
# Create virtual environment for build dependencies (overwrite if exists)
84+
uv venv .venv --python=python3.12 --clear
8685
uv sync --all-groups --all-extras
8786
8887
- name: Setup Rust for development builds
@@ -99,11 +98,8 @@ runs:
9998
run: |
10099
echo "Building development wheel for testing..."
101100
102-
# Clean up any existing virtual environment
103-
rm -rf .venv || true
104-
105-
# Create and activate virtual environment
106-
uv venv --python python3.12
101+
# Create virtual environment (overwrite if exists)
102+
uv venv .venv --python python3.12 --clear
107103
source .venv/bin/activate
108104
109105
# Install development dependencies
@@ -122,24 +118,3 @@ runs:
122118
123119
echo "All Python binding tests passed!"
124120
125-
- name: Test built wheels
126-
if: inputs.version != ''
127-
shell: bash
128-
working-directory: src/bendpy
129-
run: |
130-
echo "Testing built wheels..."
131-
132-
# Clean up any existing virtual environment
133-
rm -rf .venv || true
134-
135-
# Install from built wheel for release testing
136-
uv venv --python python3.12
137-
source .venv/bin/activate
138-
uv pip install dist/*.whl
139-
uv pip install pytest pandas polars pyarrow
140-
141-
# Run pytest tests
142-
echo "Executing pytest tests..."
143-
python -m pytest tests/ -v --tb=short
144-
145-
echo "All Python binding tests passed!"

0 commit comments

Comments
 (0)