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

Update check.yml #302

Merged
merged 1 commit into from
Sep 13, 2024
Merged
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
35 changes: 20 additions & 15 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,22 @@ jobs:
- macos-latest

steps:
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
allow-prereleases: true
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup python hatch
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install hatch
run: uv pip install hatch --system
run: uv pip install --system --python 3.12 hatch
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
allow-prereleases: true
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand Down Expand Up @@ -88,16 +92,17 @@ jobs:
steps:
- name: Let us have colors
run: echo "FORCE_COLOR=true" >> "$GITHUB_ENV"
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup python hatch
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install hatch
run: uv pip install hatch --system
run: uv pip install --system --python 3.12 hatch
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this redundant? I don't see the purpose.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nevermind, I misinterpreted the previous code block. I thought it was this https://hatch.pypa.io/latest/install/#github-actions

I do wonder if that's faster.

Copy link
Collaborator

@ofek ofek Sep 13, 2024

Choose a reason for hiding this comment

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

The UI rounds the UV version to zero and the official Hatch action to one. Behind the scenes the action downloads a prebuilt distribution so I suppose an optimization, exclusively for GitHub Actions, would be to download just site-packages. I'm not going to do this because that's a lot of work for one second but just thought I would type this out in case my stream of consciousness is useful to anyone watching 😆

Copy link
Member Author

Choose a reason for hiding this comment

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

Without this installs it into python3.10 that had some permission issues https://github.com/tox-dev/platformdirs/actions/runs/10835509905/job/30131356681?pr=301

- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand Down Expand Up @@ -134,17 +139,17 @@ jobs:
- { "name": "docs", "target": "build" }
- { "name": "readme", "target": "run" }
steps:
- name: Setup Python "3.12"
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup python hatch
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install hatch
run: uv pip install hatch --system
run: uv pip install --system --python 3.12 hatch
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand Down
Loading