Skip to content

Commit

Permalink
E2E test: install CI python dependencies with uv
Browse files Browse the repository at this point in the history
  • Loading branch information
testlabauto committed Feb 26, 2025
1 parent 888f756 commit 5a9852b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions .github/actions/install-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ inputs:
runs:
using: "composite"
steps:
- name: Install `uv`
shell: bash
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install Python dependencies
shell: bash
run: |
curl https://raw.githubusercontent.com/posit-dev/qa-example-content/main/requirements.txt --output requirements.txt
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
uv pip install -r requirements.txt
- name: Verify Python Version
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions test/e2e/pages/utils/packageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export class PackageManager {
private getCommand(language: 'R' | 'Python', packageName: PackageName, action: PackageAction): string {
if (language === 'Python') {
return action === 'install'
? `pip install ${packageName}`
: `pip uninstall -y ${packageName}`;
? `uv pip install ${packageName}`
: `uv pip uninstall -y ${packageName}`;
} else {
return action === 'install'
? `install.packages("${packageName}")`
Expand All @@ -69,10 +69,10 @@ export class PackageManager {
switch (packageName) {
case 'ipykernel':
return action === 'install'
? /Note: you may need to restart the kernel to use updated packages/
? /uv pip install completed successfully|Requirement already satisfied/
: /Successfully uninstalled ipykernel|Skipping ipykernel as it is not installed/;
default:
return action === 'install' ? /Installing/ : /Removing/;
return action === 'install' ? /Installing|Downloading|Fetched/ : /Removing|Uninstalling/;
}
}
}

0 comments on commit 5a9852b

Please sign in to comment.