Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PyPI cache to test runs #5726

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ jobs:
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on:
labels: "ubuntu-latest-large"
services:
pypyi-cache:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pypyi-cache:
pypi-cache:

Probably a typo?

image: ghcr.io/astral-sh/nginx_pypi_cache:master
ports:
- 80:80
volumes:
- /var/lib/nginx/pypi:/tmp/pypi-cache

name: "cargo test | ubuntu"
steps:
- uses: actions/checkout@v4
Expand All @@ -154,6 +162,12 @@ jobs:

- uses: Swatinem/rust-cache@v2

- name: Restore PyPI cache
uses: actions/cache@v4
with:
path: /tmp/pypi-cache
key: pypi-cache-${{ runner.os }}

- name: "Install required Python versions"
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
Expand All @@ -166,6 +180,7 @@ jobs:

- name: "Cargo test"
run: |
export UV_INDEX_URL="http://localhost:80/simple"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export UV_INDEX_URL="http://localhost:80/simple"
export UV_INDEX_URL="http://localhost/simple"

Shouldn't be a need to specify the port in this case

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export UV_INDEX_URL="http://localhost:80/simple"
export UV_INDEX_URL="http://127.0.0.1:80/simple"

https://www.youtube.com/watch?v=98SYTvNw1kw

and with @samypr100 suggestion

Suggested change
export UV_INDEX_URL="http://localhost:80/simple"
export UV_INDEX_URL="http://127.0.0.1/simple"

cargo nextest run \
--features python-patch \
--workspace \
Expand Down
Loading