Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix uv venv in testing
  • Loading branch information
T4rk1n committed Jun 20, 2025
commit 68c15606495871f568e2bc83287ebc88a547a4ae
56 changes: 50 additions & 6 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ jobs:
with:
enable-cache: true

- name: Create virtual environment and install dependencies
run: |
uv venv .venv --python 3.12
source .venv/bin/activate
uv sync --extra ci --extra testing --extra dev
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH

- name: Download built Dash packages
uses: actions/download-artifact@v4
with:
Expand All @@ -143,7 +151,9 @@ jobs:

- name: Install Dash packages
run: |
find packages -name dash-*.whl -print -exec uv pip install "{}[ci,testing,dev]" \;
WHEEL_FILE=$(find packages -name "dash-*.whl" | head -1)
echo "Installing wheel: $WHEEL_FILE"
uv pip install "$WHEEL_FILE[ci,testing,dev]"

- name: Build/Setup test components
run: npm run setup-tests.py # TODO build the packages and save them to packages/ in build job
Expand Down Expand Up @@ -206,6 +216,14 @@ jobs:
with:
enable-cache: true

- name: Create virtual environment and install dependencies
run: |
uv venv .venv --python ${{ matrix.python-version }}
source .venv/bin/activate
uv sync --extra async --extra ci --extra testing --extra dev --extra celery --extra diskcache
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH

- name: Download built Dash packages
uses: actions/download-artifact@v4
with:
Expand All @@ -215,7 +233,9 @@ jobs:
- name: Install Dash packages
run: |
uv pip install "selenium==4.32.0"
find packages -name dash-*.whl -print -exec uv pip install "{}[async,ci,testing,dev,celery,diskcache]" \;
WHEEL_FILE=$(find packages -name "dash-*.whl" | head -1)
echo "Installing wheel: $WHEEL_FILE"
uv pip install "$WHEEL_FILE[async,ci,testing,dev,celery,diskcache]"

- name: Install Google Chrome
run: |
Expand Down Expand Up @@ -322,6 +342,14 @@ jobs:
with:
enable-cache: true

- name: Create virtual environment and install dependencies
run: |
uv venv .venv --python ${{ matrix.python-version }}
source .venv/bin/activate
uv sync --extra ci --extra testing --extra dev
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH

- name: Download built Dash packages
uses: actions/download-artifact@v4
with:
Expand All @@ -330,7 +358,9 @@ jobs:

- name: Install Dash packages
run: |
find packages -name dash-*.whl -print -exec uv pip install "{}[ci,testing,dev]" \;
WHEEL_FILE=$(find packages -name "dash-*.whl" | head -1)
echo "Installing wheel: $WHEEL_FILE"
uv pip install "$WHEEL_FILE[ci,testing,dev]"

- name: Lint
run: |
Expand Down Expand Up @@ -383,6 +413,14 @@ jobs:
with:
enable-cache: true

- name: Create virtual environment and install dependencies
run: |
uv venv .venv --python ${{ matrix.python-version }}
source .venv/bin/activate
uv sync --extra ci --extra testing --extra dev
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH

- name: Download built Dash packages
uses: actions/download-artifact@v4
with:
Expand All @@ -391,7 +429,9 @@ jobs:

- name: Install Dash packages
run: |
find packages -name dash-*.whl -print -exec uv pip install "{}[ci,testing,dev]" \;
WHEEL_FILE=$(find packages -name "dash-*.whl" | head -1)
echo "Installing wheel: $WHEEL_FILE"
uv pip install "$WHEEL_FILE[ci,testing,dev]"
uv pip install pytest-split

- name: Install Google Chrome
Expand Down Expand Up @@ -509,11 +549,15 @@ jobs:
# Build the wheel
uv build --wheel --out-dir dist-test

# Find the wheel file
WHEEL_FILE=$(find dist-test -name "*.whl" | head -1)
echo "Found wheel: $WHEEL_FILE"

# Test basic installation
uv pip install dist-test/*.whl
uv pip install "$WHEEL_FILE"

# Test dev extra installation
uv pip install --force-reinstall "dist-test/*.whl[dev]"
uv pip install --force-reinstall "$WHEEL_FILE[dev]"

# Test import and basic functionality
python -c "import dash; print(f'Dash {dash.__version__} imported successfully')"
Expand Down
Loading