-
Notifications
You must be signed in to change notification settings - Fork 75
adds integration for tox-uv and updates workflows to use tox-uv #676
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,18 +69,21 @@ jobs: | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||
| with: | ||
| python-version: 3.11 | ||
| cache: pip | ||
| cache-dependency-path: | | ||
| **/pyproject.toml | ||
| **/requirements*.txt | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v4 | ||
| with: | ||
| enable-cache: true | ||
|
Comment on lines
+73
to
+76
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Pin the third-party action to a commit SHA for security. The 🔎 Verification script to find the latest commit SHA for v4#!/bin/bash
# Fetch the latest commit SHA for the v4 tag of astral-sh/setup-uv
gh api repos/astral-sh/setup-uv/git/refs/tags/v4 --jq '.object.sha // .object.url' | \
xargs -I {} sh -c 'if [[ {} == https://* ]]; then gh api {} --jq .object.sha; else echo {}; fi'🤖 Prompt for AI Agents |
||
|
|
||
| - name: Install tox | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install tox tox-gh -c constraints-dev.txt | ||
| uv venv venv | ||
| source venv/bin/activate | ||
| uv pip install tox tox-uv -c constraints-dev.txt | ||
|
|
||
| - name: "${{ matrix.lint.name }}" | ||
| run: | | ||
| source venv/bin/activate | ||
| ${{ matrix.lint.commands }} | ||
| env: | ||
| RUFF_OUTPUT_FORMAT: github | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,13 +62,18 @@ jobs: | |
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: "Install uv" | ||
| uses: astral-sh/setup-uv@v4 | ||
| with: | ||
| enable-cache: true | ||
|
Comment on lines
+65
to
+68
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Pin the third-party action to a commit SHA for security. The 🔎 Verification script to find the latest commit SHA for v4#!/bin/bash
# Fetch the latest commit SHA for the v4 tag of astral-sh/setup-uv
gh api repos/astral-sh/setup-uv/git/refs/tags/v4 --jq '.object.sha // .object.url' | \
xargs -I {} sh -c 'if [[ {} == https://* ]]; then gh api {} --jq .object.sha; else echo {}; fi'🤖 Prompt for AI Agents |
||
|
|
||
| # installs in $GITHUB_WORKSPACE/venv. | ||
| # only has to install Tox because Tox will do the other virtual environment management. | ||
| - name: "Setup Python virtual environment" | ||
| run: | | ||
| python -m venv --upgrade-deps venv | ||
| uv venv venv | ||
| . venv/bin/activate | ||
| pip install tox -c constraints-dev.txt | ||
| uv pip install tox tox-uv -c constraints-dev.txt | ||
|
|
||
| - name: "Show disk utilization BEFORE tests" | ||
| if: always() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Pin the third-party action to a commit SHA for security.
The
astral-sh/setup-uv@v4action uses a mutable tag reference. For security best practices, pin it to a specific commit SHA to ensure immutable and auditable dependencies.🔎 Verification script to find the latest commit SHA for v4
🤖 Prompt for AI Agents