Skip to content

Commit

Permalink
🚀 Speed up import test with uv
Browse files Browse the repository at this point in the history
  • Loading branch information
daquintero committed Aug 21, 2024
1 parent 58d4440 commit 09790fa
Showing 1 changed file with 35 additions and 4 deletions.
39 changes: 35 additions & 4 deletions .github/workflows/test_import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,56 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Set up uv
# Install a specific uv version using the installer
run: curl -LsSf https://astral.sh/uv/0.3.0/install.sh | sh
shell: bash

- name: Install dependencies - basic
run: |
git config --global core.longpaths true
python -m pip install --upgrade pip
pip install .
uv --version
uv venv --python=python${{ matrix.python-version }} venv_basic
if [[ "$RUNNER_OS" == "Windows" ]]; then
source venv_basic/Scripts/activate
else
source venv_basic/bin/activate
fi
uv pip install -e .
shell: bash

- name: Test package import - basic
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
source venv_basic/Scripts/activate
else
source venv_basic/bin/activate
fi
python -c "import piel"
python -c "import piel.experimental"
python -c "import piel.visual"
shell: bash

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
uv --version
uv venv --python=python${{ matrix.python-version }} venv_dev
if [[ "$RUNNER_OS" == "Windows" ]]; then
source venv_dev/Scripts/activate
else
source venv_dev/bin/activate
fi
uv pip install -e .[dev]
shell: bash

- name: Test package import
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
source venv_dev/Scripts/activate
else
source venv_dev/bin/activate
fi
python -c "import piel"
python -c "import piel.experimental"
python -c "import piel.visual"
shell: bash

0 comments on commit 09790fa

Please sign in to comment.