mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-12-17 11:05:59 +00:00
Compare commits
1 Commits
v6.4.0
...
inline-dis
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6120bf3e89 |
9
.github/actionlint.yaml
vendored
9
.github/actionlint.yaml
vendored
@@ -1,9 +0,0 @@
|
|||||||
self-hosted-runner:
|
|
||||||
# Custom labels of self-hosted or large GitHub hosted runners
|
|
||||||
# so that actionlint knows that they are not a typo
|
|
||||||
labels:
|
|
||||||
- selfhosted-ubuntu-arm64
|
|
||||||
# Configuration variables in array of strings defined in your repository or
|
|
||||||
# organization. `null` means disabling configuration variables check.
|
|
||||||
# Empty array means no configuration variable is allowed.
|
|
||||||
config-variables: null
|
|
||||||
2
.github/release-drafter.yml
vendored
2
.github/release-drafter.yml
vendored
@@ -19,7 +19,7 @@ categories:
|
|||||||
labels:
|
labels:
|
||||||
- "maintenance"
|
- "maintenance"
|
||||||
- "ci"
|
- "ci"
|
||||||
- "update-known-versions"
|
- "update-known-checksums"
|
||||||
- title: "📚 Documentation"
|
- title: "📚 Documentation"
|
||||||
labels:
|
labels:
|
||||||
- "documentation"
|
- "documentation"
|
||||||
|
|||||||
35
.github/scripts/check-all-tests-passed-needs.ts
vendored
35
.github/scripts/check-all-tests-passed-needs.ts
vendored
@@ -1,35 +0,0 @@
|
|||||||
import * as fs from "node:fs";
|
|
||||||
import * as yaml from "js-yaml";
|
|
||||||
|
|
||||||
interface WorkflowJob {
|
|
||||||
needs?: string[];
|
|
||||||
[key: string]: unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Workflow {
|
|
||||||
jobs: Record<string, WorkflowJob>;
|
|
||||||
[key: string]: unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
const workflow = yaml.load(
|
|
||||||
fs.readFileSync("../workflows/test.yml", "utf8"),
|
|
||||||
) as Workflow;
|
|
||||||
const jobs = Object.keys(workflow.jobs);
|
|
||||||
const allTestsPassed = workflow.jobs["all-tests-passed"];
|
|
||||||
const needs: string[] = allTestsPassed.needs || [];
|
|
||||||
|
|
||||||
const expectedNeeds = jobs.filter((j) => j !== "all-tests-passed");
|
|
||||||
const missing = expectedNeeds.filter((j) => !needs.includes(j));
|
|
||||||
|
|
||||||
if (missing.length > 0) {
|
|
||||||
console.error(
|
|
||||||
`Missing jobs in all-tests-passed needs: ${missing.join(", ")}`,
|
|
||||||
);
|
|
||||||
console.info(
|
|
||||||
"Please add the missing jobs to the needs section of all-tests-passed in test.yml.",
|
|
||||||
);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
console.log(
|
|
||||||
"All jobs in test.yml are in the needs section of all-tests-passed.",
|
|
||||||
);
|
|
||||||
5
.github/workflows/release-drafter.yml
vendored
5
.github/workflows/release-drafter.yml
vendored
@@ -11,10 +11,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
update_release_draft:
|
update_release_draft:
|
||||||
name: ✏️ Draft release
|
name: ✏️ Draft release
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: read
|
|
||||||
steps:
|
steps:
|
||||||
- name: 🚀 Run Release Drafter
|
- name: 🚀 Run Release Drafter
|
||||||
uses: release-drafter/release-drafter@v6.1.0
|
uses: release-drafter/release-drafter@v6.1.0
|
||||||
|
|||||||
46
.github/workflows/test-cache-windows.yml
vendored
Normal file
46
.github/workflows/test-cache-windows.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: "test-cache-windows"
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-setup-cache:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup with cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__\fixtures\uv-project
|
||||||
|
test-restore-cache:
|
||||||
|
runs-on: windows-latest
|
||||||
|
needs: test-setup-cache
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Restore with cache
|
||||||
|
id: restore
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
- name: Cache was hit
|
||||||
|
run: |
|
||||||
|
if ($env:CACHE_HIT -ne "true") {
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__\fixtures\uv-project
|
||||||
232
.github/workflows/test-cache.yml
vendored
Normal file
232
.github/workflows/test-cache.yml
vendored
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
name: "test-cache"
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-setup-cache:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
enable-cache: [ "true", "false", "auto" ]
|
||||||
|
os: ["ubuntu-latest", "selfhosted-ubuntu-arm64"]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup with cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
enable-cache: ${{ matrix.enable-cache }}
|
||||||
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-${{ matrix.os }}-${{ matrix.enable-cache }}
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__/fixtures/uv-project
|
||||||
|
test-restore-cache:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
enable-cache: [ "true", "false", "auto" ]
|
||||||
|
os: [ "ubuntu-latest", "selfhosted-ubuntu-arm64" ]
|
||||||
|
needs: test-setup-cache
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Restore with cache
|
||||||
|
id: restore
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
enable-cache: ${{ matrix.enable-cache }}
|
||||||
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-${{ matrix.os }}-${{ matrix.enable-cache }}
|
||||||
|
- name: Cache was hit
|
||||||
|
if: ${{ matrix.enable-cache == 'true' || (matrix.enable-cache == 'auto' && matrix.os == 'ubuntu-latest') }}
|
||||||
|
run: |
|
||||||
|
if [ "$CACHE_HIT" != "true" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
||||||
|
- name: Cache was not hit
|
||||||
|
if: ${{ matrix.enable-cache == 'false' || (matrix.enable-cache == 'auto' && matrix.os == 'selfhosted-ubuntu-arm64') }}
|
||||||
|
run: |
|
||||||
|
if [ "$CACHE_HIT" == "true" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__/fixtures/uv-project
|
||||||
|
test-setup-cache-requirements-txt:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup with cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-requirements-txt
|
||||||
|
- run: |
|
||||||
|
uv venv
|
||||||
|
uv pip install -r requirements.txt
|
||||||
|
working-directory: __tests__/fixtures/requirements-txt-project
|
||||||
|
test-restore-cache-requirements-txt:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: test-setup-cache
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Restore with cache
|
||||||
|
id: restore
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-requirements-txt
|
||||||
|
- name: Cache was hit
|
||||||
|
run: |
|
||||||
|
if [ "$CACHE_HIT" != "true" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
||||||
|
- run: |
|
||||||
|
uv venv
|
||||||
|
uv pip install -r requirements.txt
|
||||||
|
working-directory: __tests__/fixtures/requirements-txt-project
|
||||||
|
|
||||||
|
test-setup-cache-dependency-glob:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup with cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
cache-dependency-glob: |
|
||||||
|
__tests__/fixtures/uv-project/uv.lock
|
||||||
|
**/pyproject.toml
|
||||||
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-dependency-glob
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__/fixtures/uv-project
|
||||||
|
test-restore-cache-dependency-glob:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: test-setup-cache-dependency-glob
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Change pyproject.toml
|
||||||
|
run: |
|
||||||
|
echo '[tool.uv]' >> __tests__/fixtures/uv-project/pyproject.toml
|
||||||
|
echo 'dev-dependencies = []' >> __tests__/fixtures/uv-project/pyproject.toml
|
||||||
|
- name: Restore with cache
|
||||||
|
id: restore
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
cache-dependency-glob: |
|
||||||
|
__tests__/fixtures/uv-project/uv.lock
|
||||||
|
**/pyproject.toml
|
||||||
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-dependency-glob
|
||||||
|
ignore-nothing-to-cache: true
|
||||||
|
- name: Cache was not hit
|
||||||
|
run: |
|
||||||
|
if [ "$CACHE_HIT" == "true" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
||||||
|
|
||||||
|
test-setup-cache-local:
|
||||||
|
runs-on: selfhosted-ubuntu-arm64
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup with cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-local
|
||||||
|
cache-local-path: /tmp/uv-cache
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__/fixtures/uv-project
|
||||||
|
test-restore-cache-local:
|
||||||
|
runs-on: selfhosted-ubuntu-arm64
|
||||||
|
needs: test-setup-cache-local
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Restore with cache
|
||||||
|
id: restore
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-local
|
||||||
|
cache-local-path: /tmp/uv-cache
|
||||||
|
- name: Cache was hit
|
||||||
|
run: |
|
||||||
|
if [ "$CACHE_HIT" != "true" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__/fixtures/uv-project
|
||||||
|
|
||||||
|
test-tilde-expansion-cache-local-path:
|
||||||
|
runs-on: selfhosted-ubuntu-arm64
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Create cache directory
|
||||||
|
run: mkdir -p ~/uv-cache
|
||||||
|
shell: bash
|
||||||
|
- name: Setup with cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
cache-local-path: ~/uv-cache/cache-local-path
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__/fixtures/uv-project
|
||||||
|
|
||||||
|
test-tilde-expansion-cache-dependency-glob:
|
||||||
|
runs-on: selfhosted-ubuntu-arm64
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Create cache directory
|
||||||
|
run: mkdir -p ~/uv-cache
|
||||||
|
shell: bash
|
||||||
|
- name: Create cache dependency glob file
|
||||||
|
run: touch ~/uv-cache.glob
|
||||||
|
shell: bash
|
||||||
|
- name: Setup with cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
cache-local-path: ~/uv-cache/cache-dependency-glob
|
||||||
|
cache-dependency-glob: "~/uv-cache.glob"
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__/fixtures/uv-project
|
||||||
|
|
||||||
|
cleanup-tilde-expansion-tests:
|
||||||
|
needs:
|
||||||
|
- test-tilde-expansion-cache-local-path
|
||||||
|
- test-tilde-expansion-cache-dependency-glob
|
||||||
|
runs-on: selfhosted-ubuntu-arm64
|
||||||
|
steps:
|
||||||
|
- name: Remove cache directory
|
||||||
|
run: rm -rf ~/uv-cache
|
||||||
|
shell: bash
|
||||||
|
- name: Remove cache dependency glob file
|
||||||
|
run: rm -f ~/uv-cache.glob
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
test-no-python-version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Fake pyproject.toml at root
|
||||||
|
run: cp __tests__/fixtures/old-python-constraint-project/pyproject.toml pyproject.toml
|
||||||
|
- name: Setup with cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__/fixtures/old-python-constraint-project
|
||||||
30
.github/workflows/test-windows.yml
vendored
Normal file
30
.github/workflows/test-windows.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
name: "test-windows"
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-default-version:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Should not be on path
|
||||||
|
run: |
|
||||||
|
if (!(Get-Command -Name "uv" -ErrorAction SilentlyContinue)) {
|
||||||
|
exit 0
|
||||||
|
} else {
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
- name: Setup uv
|
||||||
|
uses: ./
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__\fixtures\uv-project
|
||||||
446
.github/workflows/test.yml
vendored
446
.github/workflows/test.yml
vendored
@@ -12,9 +12,6 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -29,33 +26,20 @@ jobs:
|
|||||||
npm install
|
npm install
|
||||||
- run: |
|
- run: |
|
||||||
npm run all
|
npm run all
|
||||||
- name: Check all jobs are in all-tests-passed.needs
|
|
||||||
run: |
|
|
||||||
tsc check-all-tests-passed-needs.ts
|
|
||||||
node check-all-tests-passed-needs.js
|
|
||||||
working-directory: .github/scripts
|
|
||||||
- name: Make sure no changes from linters are detected
|
- name: Make sure no changes from linters are detected
|
||||||
run: |
|
run: |
|
||||||
git diff --exit-code || (echo "::error::Please run 'npm run all' to fix the issues" && exit 1)
|
git diff --exit-code || (echo "::error::Please run 'npm run all' to fix the issues" && exit 1)
|
||||||
|
|
||||||
test-default-version:
|
test-default-version:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
|
os: [ubuntu-latest, macos-latest, macos-14]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install latest version
|
- name: Install latest version
|
||||||
id: setup-uv
|
|
||||||
uses: ./
|
uses: ./
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
working-directory: __tests__/fixtures/uv-project
|
working-directory: __tests__/fixtures/uv-project
|
||||||
shell: bash
|
|
||||||
- name: Check uv-path is set
|
|
||||||
run: ${{ steps.setup-uv.outputs.uv-path }} --version
|
|
||||||
- name: Check uvx-path is set
|
|
||||||
run: ${{ steps.setup-uv.outputs.uvx-path }} --version
|
|
||||||
|
|
||||||
test-specific-version:
|
test-specific-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
@@ -69,12 +53,8 @@ jobs:
|
|||||||
version: ${{ matrix.uv-version }}
|
version: ${{ matrix.uv-version }}
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
working-directory: __tests__/fixtures/uv-project
|
working-directory: __tests__/fixtures/uv-project
|
||||||
|
|
||||||
test-semver-range:
|
test-semver-range:
|
||||||
strategy:
|
runs-on: ubuntu-latest
|
||||||
matrix:
|
|
||||||
os: [ ubuntu-latest, selfhosted-ubuntu-arm64 ]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install version 0.3
|
- name: Install version 0.3
|
||||||
@@ -83,35 +63,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: "0.3"
|
version: "0.3"
|
||||||
- name: Correct version gets installed
|
- name: Correct version gets installed
|
||||||
run: |
|
|
||||||
if [ "$(uv --version)" != "uv 0.3.5" ]; then
|
|
||||||
echo "Wrong uv version: $(uv --version)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- name: Output has correct version
|
|
||||||
run: |
|
run: |
|
||||||
if [ "$UV_VERSION" != "0.3.5" ]; then
|
if [ "$UV_VERSION" != "0.3.5" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
|
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
|
||||||
|
|
||||||
test-pep440-version:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install version 0.4.30
|
|
||||||
id: setup-uv
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
version: ">=0.4.25,<0.5"
|
|
||||||
- name: Correct version gets installed
|
|
||||||
run: |
|
|
||||||
if [ "$(uv --version)" != "uv 0.4.30" ]; then
|
|
||||||
echo "Wrong uv version: $(uv --version)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
test-pyproject-file-version:
|
test-pyproject-file-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -120,25 +77,14 @@ jobs:
|
|||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
working-directory: "__tests__/fixtures/pyproject-toml-project"
|
pyproject-file: "__tests__/fixtures/pyproject-toml-project/pyproject.toml"
|
||||||
- name: Correct version gets installed
|
- name: Correct version gets installed
|
||||||
run: |
|
run: |
|
||||||
if [ "$(uv --version)" != "uv 0.5.14" ]; then
|
if [ "$UV_VERSION" != "0.5.14" ]; then
|
||||||
echo "Wrong uv version: $(uv --version)"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
env:
|
||||||
test-malformed-pyproject-file-fallback:
|
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install using malformed pyproject.toml
|
|
||||||
id: setup-uv
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
working-directory: "__tests__/fixtures/malformed-pyproject-toml-project"
|
|
||||||
- run: uv --help
|
|
||||||
|
|
||||||
test-uv-file-version:
|
test-uv-file-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -147,37 +93,26 @@ jobs:
|
|||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
working-directory: "__tests__/fixtures/uv-toml-project"
|
pyproject-file: "__tests__/fixtures/uv-toml-project/pyproject.toml"
|
||||||
|
uv-file: "__tests__/fixtures/uv-toml-project/uv.toml"
|
||||||
- name: Correct version gets installed
|
- name: Correct version gets installed
|
||||||
run: |
|
run: |
|
||||||
if [ "$(uv --version)" != "uv 0.5.15" ]; then
|
if [ "$UV_VERSION" != "0.5.15" ]; then
|
||||||
echo "Wrong uv version: $(uv --version)"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
env:
|
||||||
test-version-file-version:
|
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install from requirements file
|
|
||||||
id: setup-uv
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
version-file: "__tests__/fixtures/uv-in-requirements-txt-project/requirements.txt"
|
|
||||||
- name: Correct version gets installed
|
|
||||||
run: |
|
|
||||||
if [ "$(uv --version)" != "uv 0.6.17" ]; then
|
|
||||||
echo "Wrong uv version: $(uv --version)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
test-checksum:
|
test-checksum:
|
||||||
runs-on: ${{ matrix.inputs.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
inputs:
|
os: [ubuntu-latest, macos-latest]
|
||||||
- os: ubuntu-latest
|
checksum:
|
||||||
|
["4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd"]
|
||||||
|
exclude:
|
||||||
|
- os: macos-latest
|
||||||
checksum: "4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd"
|
checksum: "4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd"
|
||||||
|
include:
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
checksum: "a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218"
|
checksum: "a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218"
|
||||||
steps:
|
steps:
|
||||||
@@ -186,10 +121,9 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
version: "0.3.2"
|
version: "0.3.2"
|
||||||
checksum: ${{ matrix.inputs.checksum }}
|
checksum: ${{ matrix.checksum }}
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
working-directory: __tests__/fixtures/uv-project
|
working-directory: __tests__/fixtures/uv-project
|
||||||
|
|
||||||
test-with-explicit-token:
|
test-with-explicit-token:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -200,7 +134,6 @@ jobs:
|
|||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
working-directory: __tests__/fixtures/uv-project
|
working-directory: __tests__/fixtures/uv-project
|
||||||
|
|
||||||
test-uvx:
|
test-uvx:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -208,7 +141,6 @@ jobs:
|
|||||||
- name: Install default version
|
- name: Install default version
|
||||||
uses: ./
|
uses: ./
|
||||||
- run: uvx ruff --version
|
- run: uvx ruff --version
|
||||||
|
|
||||||
test-tool-install:
|
test-tool-install:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
@@ -226,7 +158,6 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
- run: uv tool install ruff
|
- run: uv tool install ruff
|
||||||
- run: ruff --version
|
- run: ruff --version
|
||||||
|
|
||||||
test-tilde-expansion-tool-dirs:
|
test-tilde-expansion-tool-dirs:
|
||||||
runs-on: selfhosted-ubuntu-arm64
|
runs-on: selfhosted-ubuntu-arm64
|
||||||
steps:
|
steps:
|
||||||
@@ -246,9 +177,8 @@ jobs:
|
|||||||
echo "UV_TOOL_DIR does not contain /home/ubuntu/tool-dir: $UV_TOOL_DIR"
|
echo "UV_TOOL_DIR does not contain /home/ubuntu/tool-dir: $UV_TOOL_DIR"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test-python-version:
|
test-python-version:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
@@ -265,23 +195,8 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
|
|
||||||
test-activate-environment:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install latest version
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: 3.13.1t
|
|
||||||
activate-environment: true
|
|
||||||
- name: Verify packages can be installed
|
- name: Verify packages can be installed
|
||||||
run: uv pip install pip
|
run: uv pip install --python=3.13.1t pip
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Verify python version is correct
|
- name: Verify python version is correct
|
||||||
run: |
|
run: |
|
||||||
@@ -290,7 +205,17 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
test-malformed-pyproject-file-fallback:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install using malformed pyproject.toml
|
||||||
|
id: setup-uv
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
pyproject-file: "__tests__/fixtures/malformed-pyproject-toml-project/pyproject.toml"
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__/fixtures/uv-project
|
||||||
test-musl:
|
test-musl:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: alpine
|
container: alpine
|
||||||
@@ -300,310 +225,3 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
working-directory: __tests__/fixtures/uv-project
|
working-directory: __tests__/fixtures/uv-project
|
||||||
|
|
||||||
test-setup-cache:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
enable-cache: [ "true", "false", "auto" ]
|
|
||||||
os: [ "ubuntu-latest", "selfhosted-ubuntu-arm64", "windows-latest" ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup with cache
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: ${{ matrix.enable-cache }}
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-${{ matrix.os }}-${{ matrix.enable-cache }}
|
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
shell: bash
|
|
||||||
test-restore-cache:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
enable-cache: [ "true", "false", "auto" ]
|
|
||||||
os: [ "ubuntu-latest", "selfhosted-ubuntu-arm64", "windows-latest" ]
|
|
||||||
needs: test-setup-cache
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Restore with cache
|
|
||||||
id: restore
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: ${{ matrix.enable-cache }}
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-${{ matrix.os }}-${{ matrix.enable-cache }}
|
|
||||||
- name: Cache was hit
|
|
||||||
if: ${{ matrix.enable-cache == 'true' || (matrix.enable-cache == 'auto' && matrix.os == 'ubuntu-latest') }}
|
|
||||||
run: |
|
|
||||||
if [ "$CACHE_HIT" != "true" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
|
||||||
shell: bash
|
|
||||||
- name: Cache was not hit
|
|
||||||
if: ${{ matrix.enable-cache == 'false' || (matrix.enable-cache == 'auto' && matrix.os == 'selfhosted-ubuntu-arm64') }}
|
|
||||||
run: |
|
|
||||||
if [ "$CACHE_HIT" == "true" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
|
||||||
shell: bash
|
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
test-setup-cache-requirements-txt:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup with cache
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-requirements-txt
|
|
||||||
- run: |
|
|
||||||
uv venv
|
|
||||||
uv pip install -r requirements.txt
|
|
||||||
working-directory: __tests__/fixtures/requirements-txt-project
|
|
||||||
test-restore-cache-requirements-txt:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: test-setup-cache
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Restore with cache
|
|
||||||
id: restore
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-requirements-txt
|
|
||||||
- name: Cache was hit
|
|
||||||
run: |
|
|
||||||
if [ "$CACHE_HIT" != "true" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
|
||||||
- run: |
|
|
||||||
uv venv
|
|
||||||
uv pip install -r requirements.txt
|
|
||||||
working-directory: __tests__/fixtures/requirements-txt-project
|
|
||||||
|
|
||||||
test-setup-cache-dependency-glob:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup with cache
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
cache-dependency-glob: |
|
|
||||||
__tests__/fixtures/uv-project/uv.lock
|
|
||||||
**/pyproject.toml
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-dependency-glob
|
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
test-restore-cache-dependency-glob:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: test-setup-cache-dependency-glob
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Change pyproject.toml
|
|
||||||
run: |
|
|
||||||
echo '[tool.uv]' >> __tests__/fixtures/uv-project/pyproject.toml
|
|
||||||
echo 'dev-dependencies = []' >> __tests__/fixtures/uv-project/pyproject.toml
|
|
||||||
- name: Restore with cache
|
|
||||||
id: restore
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
cache-dependency-glob: |
|
|
||||||
__tests__/fixtures/uv-project/uv.lock
|
|
||||||
**/pyproject.toml
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-dependency-glob
|
|
||||||
ignore-nothing-to-cache: true
|
|
||||||
- name: Cache was not hit
|
|
||||||
run: |
|
|
||||||
if [ "$CACHE_HIT" == "true" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
|
||||||
|
|
||||||
test-cache-local:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
inputs:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
expected-cache-dir: "/home/runner/work/_temp/setup-uv-cache"
|
|
||||||
- os: windows-latest
|
|
||||||
expected-cache-dir: "D:\\a\\_temp\\setup-uv-cache"
|
|
||||||
- os: selfhosted-ubuntu-arm64
|
|
||||||
expected-cache-dir: "/home/ubuntu/.cache/uv"
|
|
||||||
runs-on: ${{ matrix.inputs.os }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup with cache
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-local
|
|
||||||
- run: |
|
|
||||||
if [ "$UV_CACHE_DIR" != "${{ matrix.inputs.expected-cache-dir }}" ]; then
|
|
||||||
echo "UV_CACHE_DIR is not set to the expected value: $UV_CACHE_DIR"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
test-setup-cache-local:
|
|
||||||
runs-on: selfhosted-ubuntu-arm64
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup with cache
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-local
|
|
||||||
cache-local-path: /tmp/uv-cache
|
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
test-restore-cache-local:
|
|
||||||
runs-on: selfhosted-ubuntu-arm64
|
|
||||||
needs: test-setup-cache-local
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Restore with cache
|
|
||||||
id: restore
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-local
|
|
||||||
cache-local-path: /tmp/uv-cache
|
|
||||||
- name: Cache was hit
|
|
||||||
run: |
|
|
||||||
if [ "$CACHE_HIT" != "true" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
|
|
||||||
test-tilde-expansion-cache-local-path:
|
|
||||||
runs-on: selfhosted-ubuntu-arm64
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Create cache directory
|
|
||||||
run: mkdir -p ~/uv-cache
|
|
||||||
shell: bash
|
|
||||||
- name: Setup with cache
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
cache-local-path: ~/uv-cache/cache-local-path
|
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
|
|
||||||
test-tilde-expansion-cache-dependency-glob:
|
|
||||||
runs-on: selfhosted-ubuntu-arm64
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Create cache directory
|
|
||||||
run: mkdir -p ~/uv-cache
|
|
||||||
shell: bash
|
|
||||||
- name: Create cache dependency glob file
|
|
||||||
run: touch ~/uv-cache.glob
|
|
||||||
shell: bash
|
|
||||||
- name: Setup with cache
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
cache-local-path: ~/uv-cache/cache-dependency-glob
|
|
||||||
cache-dependency-glob: "~/uv-cache.glob"
|
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
|
|
||||||
cleanup-tilde-expansion-tests:
|
|
||||||
needs:
|
|
||||||
- test-tilde-expansion-cache-local-path
|
|
||||||
- test-tilde-expansion-cache-dependency-glob
|
|
||||||
if: always()
|
|
||||||
runs-on: selfhosted-ubuntu-arm64
|
|
||||||
steps:
|
|
||||||
- name: Remove cache directory
|
|
||||||
run: rm -rf ~/uv-cache
|
|
||||||
shell: bash
|
|
||||||
- name: Remove cache dependency glob file
|
|
||||||
run: rm -f ~/uv-cache.glob
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
test-no-python-version:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Fake pyproject.toml at root
|
|
||||||
run: cp __tests__/fixtures/old-python-constraint-project/pyproject.toml pyproject.toml
|
|
||||||
- name: Setup with cache
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/old-python-constraint-project
|
|
||||||
|
|
||||||
test-custom-manifest-file:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install from custom manifest file
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
manifest-file: "https://raw.githubusercontent.com/astral-sh/setup-uv/${{ github.ref }}/__tests__/download/custom-manifest.json"
|
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
- name: Correct version gets installed
|
|
||||||
run: |
|
|
||||||
if [ "$(uv --version)" != "uv 0.7.12-alpha.1" ]; then
|
|
||||||
echo "Wrong uv version: $(uv --version)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
all-tests-passed:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- lint
|
|
||||||
- test-default-version
|
|
||||||
- test-specific-version
|
|
||||||
- test-semver-range
|
|
||||||
- test-pep440-version
|
|
||||||
- test-pyproject-file-version
|
|
||||||
- test-malformed-pyproject-file-fallback
|
|
||||||
- test-uv-file-version
|
|
||||||
- test-version-file-version
|
|
||||||
- test-checksum
|
|
||||||
- test-with-explicit-token
|
|
||||||
- test-uvx
|
|
||||||
- test-tool-install
|
|
||||||
- test-tilde-expansion-tool-dirs
|
|
||||||
- test-python-version
|
|
||||||
- test-activate-environment
|
|
||||||
- test-musl
|
|
||||||
- test-cache-local
|
|
||||||
- test-setup-cache
|
|
||||||
- test-restore-cache
|
|
||||||
- test-setup-cache-requirements-txt
|
|
||||||
- test-restore-cache-requirements-txt
|
|
||||||
- test-setup-cache-dependency-glob
|
|
||||||
- test-restore-cache-dependency-glob
|
|
||||||
- test-setup-cache-local
|
|
||||||
- test-restore-cache-local
|
|
||||||
- test-tilde-expansion-cache-local-path
|
|
||||||
- test-tilde-expansion-cache-dependency-glob
|
|
||||||
- cleanup-tilde-expansion-tests
|
|
||||||
- test-no-python-version
|
|
||||||
- test-custom-manifest-file
|
|
||||||
if: always()
|
|
||||||
steps:
|
|
||||||
- name: All tests passed
|
|
||||||
run: |
|
|
||||||
echo "All jobs passed: ${{ !contains(needs.*.result, 'failure') }}"
|
|
||||||
# shellcheck disable=SC2242
|
|
||||||
exit ${{ contains(needs.*.result, 'failure') && 1 || 0 }}
|
|
||||||
|
|||||||
34
.github/workflows/update-known-checksums.yml
vendored
Normal file
34
.github/workflows/update-known-checksums.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: "Update known checksums"
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 4 * * *" # Run every day at 4am UTC
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
- name: Update known checksums
|
||||||
|
id: update-known-checksums
|
||||||
|
run:
|
||||||
|
node dist/update-known-checksums/index.js
|
||||||
|
src/download/checksum/known-checksums.ts ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- run: npm install && npm run all
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||||
|
with:
|
||||||
|
commit-message: "chore: update known checksums"
|
||||||
|
title:
|
||||||
|
"chore: update known checksums for ${{
|
||||||
|
steps.update-known-checksums.outputs.latest-version }}"
|
||||||
|
body:
|
||||||
|
"chore: update known checksums for ${{
|
||||||
|
steps.update-known-checksums.outputs.latest-version }}"
|
||||||
|
base: main
|
||||||
|
labels: "automated-pr,update-known-checksums"
|
||||||
|
branch: update-known-checksums-pr
|
||||||
|
delete-branch: true
|
||||||
39
.github/workflows/update-known-versions.yml
vendored
39
.github/workflows/update-known-versions.yml
vendored
@@ -1,39 +0,0 @@
|
|||||||
name: "Update known versions"
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 4 * * *" # Run every day at 4am UTC
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-24.04-arm
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: "20"
|
|
||||||
- name: Update known versions
|
|
||||||
id: update-known-versions
|
|
||||||
run:
|
|
||||||
node dist/update-known-versions/index.js
|
|
||||||
src/download/checksum/known-checksums.ts
|
|
||||||
version-manifest.json
|
|
||||||
${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- run: npm install && npm run all
|
|
||||||
- name: Create Pull Request
|
|
||||||
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
|
||||||
with:
|
|
||||||
commit-message: "chore: update known versions"
|
|
||||||
title:
|
|
||||||
"chore: update known versions for ${{
|
|
||||||
steps.update-known-versions.outputs.latest-version }}"
|
|
||||||
body:
|
|
||||||
"chore: update known versions for ${{
|
|
||||||
steps.update-known-versions.outputs.latest-version }}"
|
|
||||||
base: main
|
|
||||||
labels: "automated-pr,update-known-versions"
|
|
||||||
branch: update-known-versions-pr
|
|
||||||
delete-branch: true
|
|
||||||
@@ -11,9 +11,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
update_major_minor_tags:
|
update_major_minor_tags:
|
||||||
name: Make sure major and minor tags are up to date on a patch release
|
name: Make sure major and minor tags are up to date on a patch release
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Update Major Minor Tags
|
- name: Update Major Minor Tags
|
||||||
|
|||||||
199
README.md
199
README.md
@@ -14,11 +14,9 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
|
|||||||
- [Install a required-version or latest (default)](#install-a-required-version-or-latest-default)
|
- [Install a required-version or latest (default)](#install-a-required-version-or-latest-default)
|
||||||
- [Install the latest version](#install-the-latest-version)
|
- [Install the latest version](#install-the-latest-version)
|
||||||
- [Install a specific version](#install-a-specific-version)
|
- [Install a specific version](#install-a-specific-version)
|
||||||
- [Install a version by supplying a semver range or pep440 specifier](#install-a-version-by-supplying-a-semver-range-or-pep440-specifier)
|
- [Install a version by supplying a semver range](#install-a-version-by-supplying-a-semver-range)
|
||||||
- [Install a version defined in a requirements or config file](#install-a-version-defined-in-a-requirements-or-config-file)
|
- [Install a required-version](#install-a-required-version)
|
||||||
- [Python version](#python-version)
|
- [Python version](#python-version)
|
||||||
- [Activate environment](#activate-environment)
|
|
||||||
- [Working directory](#working-directory)
|
|
||||||
- [Validate checksum](#validate-checksum)
|
- [Validate checksum](#validate-checksum)
|
||||||
- [Enable Caching](#enable-caching)
|
- [Enable Caching](#enable-caching)
|
||||||
- [Cache dependency glob](#cache-dependency-glob)
|
- [Cache dependency glob](#cache-dependency-glob)
|
||||||
@@ -29,7 +27,6 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
|
|||||||
- [UV_TOOL_DIR](#uv_tool_dir)
|
- [UV_TOOL_DIR](#uv_tool_dir)
|
||||||
- [UV_TOOL_BIN_DIR](#uv_tool_bin_dir)
|
- [UV_TOOL_BIN_DIR](#uv_tool_bin_dir)
|
||||||
- [Tilde Expansion](#tilde-expansion)
|
- [Tilde Expansion](#tilde-expansion)
|
||||||
- [Manifest file](#manifest-file)
|
|
||||||
- [How it works](#how-it-works)
|
- [How it works](#how-it-works)
|
||||||
- [FAQ](#faq)
|
- [FAQ](#faq)
|
||||||
|
|
||||||
@@ -39,7 +36,7 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install the latest version of uv
|
- name: Install the latest version of uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
```
|
```
|
||||||
|
|
||||||
If you do not specify a version, this action will look for a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
|
If you do not specify a version, this action will look for a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
|
||||||
@@ -52,7 +49,7 @@ For an example workflow, see
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install the latest version of uv
|
- name: Install the latest version of uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
version: "latest"
|
version: "latest"
|
||||||
```
|
```
|
||||||
@@ -61,60 +58,62 @@ For an example workflow, see
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install a specific version of uv
|
- name: Install a specific version of uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
version: "0.4.4"
|
version: "0.4.4"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install a version by supplying a semver range or pep440 specifier
|
### Install a version by supplying a semver range
|
||||||
|
|
||||||
You can specify a [semver range](https://github.com/npm/node-semver?tab=readme-ov-file#ranges)
|
You can specify a [semver range](https://github.com/npm/node-semver?tab=readme-ov-file#ranges)
|
||||||
or [pep440 specifier](https://peps.python.org/pep-0440/#version-specifiers)
|
|
||||||
to install the latest version that satisfies the range.
|
to install the latest version that satisfies the range.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install a semver range of uv
|
- name: Install a semver range of uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
version: ">=0.4.0"
|
version: ">=0.4.0"
|
||||||
```
|
```
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Pinning a minor version of uv
|
- name: Pinning a minor version of uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
version: "0.4.x"
|
version: "0.4.x"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Install a required-version
|
||||||
|
|
||||||
|
You can specify a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
|
||||||
|
in either a `uv.toml` or `pyproject.toml` file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install a pep440-specifier-satisfying version of uv
|
- name: Install required-version defined in uv.toml
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
version: ">=0.4.25,<0.5"
|
uv-file: "path/to/uv.toml"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install a version defined in a requirements or config file
|
|
||||||
|
|
||||||
You can use the `version-file` input to specify a file that contains the version of uv to install.
|
|
||||||
This can either be a `pyproject.toml` or `uv.toml` file which defines a `required-version` or
|
|
||||||
uv defined as a dependency in `pyproject.toml` or `requirements.txt`.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install uv based on the version defined in pyproject.toml
|
- name: Install required-version defined in pyproject.toml
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
version-file: "pyproject.toml"
|
pyproject-file: "path/to/pyproject.toml"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Python version
|
### Python version
|
||||||
|
|
||||||
You can use the input `python-version` to set the environment variable `UV_PYTHON` for the rest of your workflow
|
You can use the input `python-version` to
|
||||||
|
|
||||||
|
- set the environment variable `UV_PYTHON` for the rest of your workflow
|
||||||
|
- create a new virtual environment with the specified python version
|
||||||
|
- activate the virtual environment for the rest of your workflow
|
||||||
|
|
||||||
This will override any python version specifications in `pyproject.toml` and `.python-version`
|
This will override any python version specifications in `pyproject.toml` and `.python-version`
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install the latest version of uv and set the python version to 3.13t
|
- name: Install the latest version of uv and set the python version to 3.13t
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.13t
|
python-version: 3.13t
|
||||||
- run: uv pip install --python=3.13t pip
|
- run: uv pip install --python=3.13t pip
|
||||||
@@ -132,51 +131,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install the latest version of uv and set the python version
|
- name: Install the latest version of uv and set the python version
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Test with python ${{ matrix.python-version }}
|
- name: Test with python ${{ matrix.python-version }}
|
||||||
run: uv run --frozen pytest
|
run: uv run --frozen pytest
|
||||||
```
|
```
|
||||||
|
|
||||||
### Activate environment
|
|
||||||
|
|
||||||
You can set `activate-environment` to `true` to automatically activate a venv.
|
|
||||||
This allows directly using it in later steps:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Install the latest version of uv and activate the environment
|
|
||||||
uses: astral-sh/setup-uv@v6
|
|
||||||
with:
|
|
||||||
activate-environment: true
|
|
||||||
- run: uv pip install pip
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
>
|
|
||||||
> Activating the environment adds your dependencies to the `PATH`, which could break some workflows.
|
|
||||||
> For example, if you have a dependency which requires uv, e.g., `hatch`, activating the
|
|
||||||
> environment will shadow the `uv` binary installed by this action and may result in a different uv
|
|
||||||
> version being used.
|
|
||||||
>
|
|
||||||
> We do not recommend using this setting for most use-cases. Instead, use `uv run` to execute
|
|
||||||
> commands in the environment.
|
|
||||||
|
|
||||||
### Working directory
|
|
||||||
|
|
||||||
You can set the working directory with the `working-directory` input.
|
|
||||||
This controls where we look for `pyproject.toml`, `uv.toml` and `.python-version` files
|
|
||||||
which are used to determine the version of uv and python to install.
|
|
||||||
|
|
||||||
It also controls where [the venv gets created](#activate-environment).
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Install uv based on the config files in the working-directory
|
|
||||||
uses: astral-sh/setup-uv@v6
|
|
||||||
with:
|
|
||||||
working-directory: my/subproject/dir
|
|
||||||
```
|
|
||||||
|
|
||||||
### Validate checksum
|
### Validate checksum
|
||||||
|
|
||||||
You can specify a checksum to validate the downloaded executable. Checksums up to the default version
|
You can specify a checksum to validate the downloaded executable. Checksums up to the default version
|
||||||
@@ -185,7 +146,7 @@ are automatically verified by this action. The sha256 hashes can be found on the
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install a specific version and validate the checksum
|
- name: Install a specific version and validate the checksum
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
version: "0.3.1"
|
version: "0.3.1"
|
||||||
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
|
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
|
||||||
@@ -207,7 +168,7 @@ You can optionally define a custom cache key suffix.
|
|||||||
```yaml
|
```yaml
|
||||||
- name: Enable caching and define a custom cache key suffix
|
- name: Enable caching and define a custom cache key suffix
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-suffix: "optional-suffix"
|
cache-suffix: "optional-suffix"
|
||||||
@@ -230,22 +191,16 @@ changes. If you use relative paths, they are relative to the repository root.
|
|||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
>
|
>
|
||||||
> You can look up supported patterns [here](https://github.com/actions/toolkit/tree/main/packages/glob#patterns)
|
|
||||||
>
|
|
||||||
> The default is
|
> The default is
|
||||||
> ```yaml
|
> ```yaml
|
||||||
> cache-dependency-glob: |
|
> cache-dependency-glob: |
|
||||||
> **/*requirements*.txt
|
> **/requirements*.txt
|
||||||
> **/*requirements*.in
|
|
||||||
> **/*constraints*.txt
|
|
||||||
> **/*constraints*.in
|
|
||||||
> **/pyproject.toml
|
|
||||||
> **/uv.lock
|
> **/uv.lock
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Define a cache dependency glob
|
- name: Define a cache dependency glob
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-dependency-glob: "**/pyproject.toml"
|
cache-dependency-glob: "**/pyproject.toml"
|
||||||
@@ -253,7 +208,7 @@ changes. If you use relative paths, they are relative to the repository root.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Define a list of cache dependency globs
|
- name: Define a list of cache dependency globs
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-dependency-glob: |
|
cache-dependency-glob: |
|
||||||
@@ -263,7 +218,7 @@ changes. If you use relative paths, they are relative to the repository root.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Define an absolute cache dependency glob
|
- name: Define an absolute cache dependency glob
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-dependency-glob: "/tmp/my-folder/requirements*.txt"
|
cache-dependency-glob: "/tmp/my-folder/requirements*.txt"
|
||||||
@@ -271,7 +226,7 @@ changes. If you use relative paths, they are relative to the repository root.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Never invalidate the cache
|
- name: Never invalidate the cache
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-dependency-glob: ""
|
cache-dependency-glob: ""
|
||||||
@@ -286,7 +241,7 @@ It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\uv-tool-dir` on Wi
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Define a custom uv cache path
|
- name: Define a custom uv cache path
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
cache-local-path: "/path/to/cache"
|
cache-local-path: "/path/to/cache"
|
||||||
```
|
```
|
||||||
@@ -305,7 +260,7 @@ input.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Don't prune the cache before saving it
|
- name: Don't prune the cache before saving it
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
prune-cache: false
|
prune-cache: false
|
||||||
@@ -318,7 +273,7 @@ If you want to ignore this, set the `ignore-nothing-to-cache` input to `true`.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Ignore nothing to cache
|
- name: Ignore nothing to cache
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
ignore-nothing-to-cache: true
|
ignore-nothing-to-cache: true
|
||||||
@@ -333,7 +288,7 @@ If you want to ignore this, set the `ignore-empty-workdir` input to `true`.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Ignore empty workdir
|
- name: Ignore empty workdir
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
ignore-empty-workdir: true
|
ignore-empty-workdir: true
|
||||||
```
|
```
|
||||||
@@ -350,7 +305,7 @@ are not sufficient, you can provide a custom GitHub token with the necessary per
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install the latest version of uv with a custom GitHub token
|
- name: Install the latest version of uv with a custom GitHub token
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||||
```
|
```
|
||||||
@@ -368,7 +323,7 @@ input:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install the latest version of uv with a custom tool dir
|
- name: Install the latest version of uv with a custom tool dir
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
tool-dir: "/path/to/tool/dir"
|
tool-dir: "/path/to/tool/dir"
|
||||||
```
|
```
|
||||||
@@ -387,7 +342,7 @@ If you want to change this behaviour (especially on self-hosted runners) you can
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install the latest version of uv with a custom tool bin dir
|
- name: Install the latest version of uv with a custom tool bin dir
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
tool-bin-dir: "/path/to/tool-bin/dir"
|
tool-bin-dir: "/path/to/tool-bin/dir"
|
||||||
```
|
```
|
||||||
@@ -403,7 +358,7 @@ This action supports expanding the `~` character to the user's home directory fo
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Expand the tilde character
|
- name: Expand the tilde character
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
cache-local-path: "~/path/to/cache"
|
cache-local-path: "~/path/to/cache"
|
||||||
tool-dir: "~/path/to/tool/dir"
|
tool-dir: "~/path/to/tool/dir"
|
||||||
@@ -411,44 +366,6 @@ This action supports expanding the `~` character to the user's home directory fo
|
|||||||
cache-dependency-glob: "~/my-cache-buster"
|
cache-dependency-glob: "~/my-cache-buster"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Manifest file
|
|
||||||
|
|
||||||
The `manifest-file` input allows you to specify a JSON manifest that lists available uv versions,
|
|
||||||
architectures, and their download URLs. By default, this action uses the manifest file contained
|
|
||||||
in this repository, which is automatically updated with each release of uv.
|
|
||||||
|
|
||||||
The manifest file contains an array of objects, each describing a version,
|
|
||||||
architecture, platform, and the corresponding download URL. For example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"version": "0.7.13",
|
|
||||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
|
||||||
"arch": "aarch64",
|
|
||||||
"platform": "apple-darwin",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.7.13/uv-aarch64-apple-darwin.tar.gz"
|
|
||||||
},
|
|
||||||
...
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
You can supply a custom manifest file URL to define additional versions,
|
|
||||||
architectures, or different download URLs.
|
|
||||||
This is useful if you maintain your own uv builds or want to override the default sources.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Use a custom manifest file
|
|
||||||
uses: astral-sh/setup-uv@v6
|
|
||||||
with:
|
|
||||||
manifest-file: "https://example.com/my-custom-manifest.json"
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> When you use a custom manifest file and do not set the `version` input, its default value is `latest`.
|
|
||||||
> This means the action will install the latest version available in the custom manifest file.
|
|
||||||
> This is different from the default behavior of installing the latest version from the official uv releases.
|
|
||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
|
||||||
This action downloads uv from the uv repo's official
|
This action downloads uv from the uv repo's official
|
||||||
@@ -456,7 +373,7 @@ This action downloads uv from the uv repo's official
|
|||||||
[GitHub Actions Toolkit](https://github.com/actions/toolkit) to cache it as a tool to speed up
|
[GitHub Actions Toolkit](https://github.com/actions/toolkit) to cache it as a tool to speed up
|
||||||
consecutive runs on self-hosted runners.
|
consecutive runs on self-hosted runners.
|
||||||
|
|
||||||
The installed version of uv is then added to the runner PATH, enabling later steps to invoke it
|
The installed version of uv is then added to the runner PATH, enabling subsequent steps to invoke it
|
||||||
by name (`uv`).
|
by name (`uv`).
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
@@ -474,7 +391,7 @@ For example:
|
|||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@main
|
uses: actions/checkout@main
|
||||||
- name: Install the latest version of uv
|
- name: Install the latest version of uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
- name: Test
|
- name: Test
|
||||||
@@ -486,7 +403,7 @@ To install a specific version of Python, use
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install the latest version of uv
|
- name: Install the latest version of uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
- name: Install Python 3.12
|
- name: Install Python 3.12
|
||||||
@@ -505,7 +422,7 @@ output:
|
|||||||
uses: actions/checkout@main
|
uses: actions/checkout@main
|
||||||
- name: Install the default version of uv
|
- name: Install the default version of uv
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
- name: Print the installed version
|
- name: Print the installed version
|
||||||
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
|
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
|
||||||
```
|
```
|
||||||
@@ -531,11 +448,11 @@ because they try to upload with the same cache key.
|
|||||||
You might see errors like
|
You might see errors like
|
||||||
`Failed to save: Failed to CreateCacheEntry: Received non-retryable error: Failed request: (409) Conflict: cache entry with the same key, version, and scope already exists`
|
`Failed to save: Failed to CreateCacheEntry: Received non-retryable error: Failed request: (409) Conflict: cache entry with the same key, version, and scope already exists`
|
||||||
|
|
||||||
### Why do I see warnings like `No GitHub Actions cache found for key`
|
### Why do I see warnings like `Cache not found for keys`
|
||||||
|
|
||||||
When a workflow runs for the first time on a branch and has a new cache key, because the
|
When a workflow runs for the first time on a branch and has a new cache key, because the
|
||||||
[cache-dependency-glob](#cache-dependency-glob) found changed files (changed dependencies),
|
[cache-dependency-glob](#cache-dependency-glob) found changed files (changed dependencies),
|
||||||
the cache will not be found and the warning `No GitHub Actions cache found for key` will be printed.
|
the cache will not be found and the warning `Cache not found for keys` will be printed.
|
||||||
|
|
||||||
While this might be irritating at first, it is expected behaviour and the cache will be created
|
While this might be irritating at first, it is expected behaviour and the cache will be created
|
||||||
and reused in later workflows.
|
and reused in later workflows.
|
||||||
@@ -551,28 +468,6 @@ Some workflows need uv but do not need to access the repository content.
|
|||||||
But **if** you need to access the repository content, you have run `actions/checkout` before running `setup-uv`.
|
But **if** you need to access the repository content, you have run `actions/checkout` before running `setup-uv`.
|
||||||
Running `actions/checkout` after `setup-uv` **is not supported**.
|
Running `actions/checkout` after `setup-uv` **is not supported**.
|
||||||
|
|
||||||
### Does `setup-uv` also install my project or its dependencies automatically?
|
|
||||||
|
|
||||||
No, `setup-uv` alone wont install any libraries from your `pyproject.toml` or `requirements.txt`, it only sets up `uv`.
|
|
||||||
You should run `uv sync` or `uv pip install .` separately, or use `uv run ...` to ensure necessary dependencies are installed.
|
|
||||||
|
|
||||||
### Why is a changed cache not detected and not the full cache uploaded?
|
|
||||||
|
|
||||||
When `setup-uv` starts it has to know whether it is better to download an existing cache
|
|
||||||
or start fresh and download every dependency again.
|
|
||||||
It does this by using a combination of hashes calculated on the contents of e.g. `uv.lock`.
|
|
||||||
|
|
||||||
By calculating these hashes and combining them in a key `setup-uv` can check
|
|
||||||
if an uploaded cache exists for this key.
|
|
||||||
If yes (e.g. contents of `uv.lock` did not change since last run) the dependencies in the cache
|
|
||||||
are up to date and the cache will be downloaded and used.
|
|
||||||
|
|
||||||
Details on determining which files will lead to different caches can be read under
|
|
||||||
[cache-dependency-glob](#cache-dependency-glob)
|
|
||||||
|
|
||||||
Some dependencies will never be uploaded to the cache and will be downloaded again on each run
|
|
||||||
as described in [disable-cache-pruning](#disable-cache-pruning)
|
|
||||||
|
|
||||||
## Acknowledgements
|
## Acknowledgements
|
||||||
|
|
||||||
`setup-uv` was initially written and published by [Kevin Stillhammer](https://github.com/eifinger)
|
`setup-uv` was initially written and published by [Kevin Stillhammer](https://github.com/eifinger)
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"version": "0.7.12-alpha.1",
|
|
||||||
"artifactName": "uv-x86_64-unknown-linux-gnu.tar.gz",
|
|
||||||
"arch": "x86_64",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"downloadUrl": "https://release.pyx.dev/0.7.12-alpha.1/uv-x86_64-unknown-linux-gnu.tar.gz"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
print("Hello world")
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uv==0.6.17
|
|
||||||
30
action.yml
30
action.yml
@@ -6,25 +6,18 @@ inputs:
|
|||||||
version:
|
version:
|
||||||
description: "The version of uv to install e.g., `0.5.0` Defaults to the version in pyproject.toml or 'latest'."
|
description: "The version of uv to install e.g., `0.5.0` Defaults to the version in pyproject.toml or 'latest'."
|
||||||
default: ""
|
default: ""
|
||||||
version-file:
|
pyproject-file:
|
||||||
description: "Path to a file containing the version of uv to install. Defaults to searching for uv.toml and if not found pyproject.toml."
|
description: "Path to a pyproject.toml"
|
||||||
|
default: ""
|
||||||
|
uv-file:
|
||||||
|
description: "Path to a uv.toml"
|
||||||
default: ""
|
default: ""
|
||||||
python-version:
|
python-version:
|
||||||
description: "The version of Python to set UV_PYTHON to"
|
description: "The version of Python to set UV_PYTHON to"
|
||||||
required: false
|
required: false
|
||||||
activate-environment:
|
|
||||||
description: "Use uv venv to activate a venv ready to be used by later steps. "
|
|
||||||
default: "false"
|
|
||||||
working-directory:
|
|
||||||
description: "The directory to execute all commands in and look for files such as pyproject.toml"
|
|
||||||
default: ${{ github.workspace }}
|
|
||||||
checksum:
|
checksum:
|
||||||
description: "The checksum of the uv version to install"
|
description: "The checksum of the uv version to install"
|
||||||
required: false
|
required: false
|
||||||
server-url:
|
|
||||||
description: "(Deprecated) The server url to use when downloading uv"
|
|
||||||
required: false
|
|
||||||
default: "https://github.com"
|
|
||||||
github-token:
|
github-token:
|
||||||
description:
|
description:
|
||||||
"Used to increase the rate limit when retrieving versions and downloading uv."
|
"Used to increase the rate limit when retrieving versions and downloading uv."
|
||||||
@@ -38,12 +31,8 @@ inputs:
|
|||||||
"Glob pattern to match files relative to the repository root to control
|
"Glob pattern to match files relative to the repository root to control
|
||||||
the cache."
|
the cache."
|
||||||
default: |
|
default: |
|
||||||
**/*requirements*.txt
|
|
||||||
**/*requirements*.in
|
|
||||||
**/*constraints*.txt
|
|
||||||
**/*constraints*.in
|
|
||||||
**/pyproject.toml
|
|
||||||
**/uv.lock
|
**/uv.lock
|
||||||
|
**/requirements*.txt
|
||||||
cache-suffix:
|
cache-suffix:
|
||||||
description: "Suffix for the cache key"
|
description: "Suffix for the cache key"
|
||||||
required: false
|
required: false
|
||||||
@@ -65,16 +54,9 @@ inputs:
|
|||||||
tool-bin-dir:
|
tool-bin-dir:
|
||||||
description: "Custom path to set UV_TOOL_BIN_DIR to."
|
description: "Custom path to set UV_TOOL_BIN_DIR to."
|
||||||
required: false
|
required: false
|
||||||
manifest-file:
|
|
||||||
description: "URL to the manifest file containing available versions and download URLs."
|
|
||||||
required: false
|
|
||||||
outputs:
|
outputs:
|
||||||
uv-version:
|
uv-version:
|
||||||
description: "The installed uv version. Useful when using latest."
|
description: "The installed uv version. Useful when using latest."
|
||||||
uv-path:
|
|
||||||
description: "The path to the installed uv binary."
|
|
||||||
uvx-path:
|
|
||||||
description: "The path to the installed uvx binary."
|
|
||||||
cache-hit:
|
cache-hit:
|
||||||
description: "A boolean value to indicate a cache entry was found"
|
description: "A boolean value to indicate a cache entry was found"
|
||||||
runs:
|
runs:
|
||||||
|
|||||||
182
dist/save-cache/index.js
generated
vendored
182
dist/save-cache/index.js
generated
vendored
@@ -220,7 +220,7 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
};
|
};
|
||||||
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
|
core.debug(`Cache not found for keys: ${keys.join(', ')}`);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
core.info(`Cache hit for: ${request.key}`);
|
core.info(`Cache hit for: ${request.key}`);
|
||||||
@@ -2204,7 +2204,6 @@ const cacheUtils_1 = __nccwpck_require__(8299);
|
|||||||
const auth_1 = __nccwpck_require__(4552);
|
const auth_1 = __nccwpck_require__(4552);
|
||||||
const http_client_1 = __nccwpck_require__(4844);
|
const http_client_1 = __nccwpck_require__(4844);
|
||||||
const cache_twirp_client_1 = __nccwpck_require__(1486);
|
const cache_twirp_client_1 = __nccwpck_require__(1486);
|
||||||
const util_1 = __nccwpck_require__(7564);
|
|
||||||
/**
|
/**
|
||||||
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
||||||
*
|
*
|
||||||
@@ -2264,7 +2263,6 @@ class CacheServiceClient {
|
|||||||
(0, core_1.debug)(`[Response] - ${response.message.statusCode}`);
|
(0, core_1.debug)(`[Response] - ${response.message.statusCode}`);
|
||||||
(0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`);
|
(0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`);
|
||||||
const body = JSON.parse(rawBody);
|
const body = JSON.parse(rawBody);
|
||||||
(0, util_1.maskSecretUrls)(body);
|
|
||||||
(0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`);
|
(0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`);
|
||||||
if (this.isSuccessStatusCode(statusCode)) {
|
if (this.isSuccessStatusCode(statusCode)) {
|
||||||
return { response, body };
|
return { response, body };
|
||||||
@@ -2446,87 +2444,6 @@ exports.getUserAgentString = getUserAgentString;
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 7564:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.maskSecretUrls = exports.maskSigUrl = void 0;
|
|
||||||
const core_1 = __nccwpck_require__(7484);
|
|
||||||
/**
|
|
||||||
* Masks the `sig` parameter in a URL and sets it as a secret.
|
|
||||||
*
|
|
||||||
* @param url - The URL containing the signature parameter to mask
|
|
||||||
* @remarks
|
|
||||||
* This function attempts to parse the provided URL and identify the 'sig' query parameter.
|
|
||||||
* If found, it registers both the raw and URL-encoded signature values as secrets using
|
|
||||||
* the Actions `setSecret` API, which prevents them from being displayed in logs.
|
|
||||||
*
|
|
||||||
* The function handles errors gracefully if URL parsing fails, logging them as debug messages.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```typescript
|
|
||||||
* // Mask a signature in an Azure SAS token URL
|
|
||||||
* maskSigUrl('https://example.blob.core.windows.net/container/file.txt?sig=abc123&se=2023-01-01');
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
function maskSigUrl(url) {
|
|
||||||
if (!url)
|
|
||||||
return;
|
|
||||||
try {
|
|
||||||
const parsedUrl = new URL(url);
|
|
||||||
const signature = parsedUrl.searchParams.get('sig');
|
|
||||||
if (signature) {
|
|
||||||
(0, core_1.setSecret)(signature);
|
|
||||||
(0, core_1.setSecret)(encodeURIComponent(signature));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
(0, core_1.debug)(`Failed to parse URL: ${url} ${error instanceof Error ? error.message : String(error)}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.maskSigUrl = maskSigUrl;
|
|
||||||
/**
|
|
||||||
* Masks sensitive information in URLs containing signature parameters.
|
|
||||||
* Currently supports masking 'sig' parameters in the 'signed_upload_url'
|
|
||||||
* and 'signed_download_url' properties of the provided object.
|
|
||||||
*
|
|
||||||
* @param body - The object should contain a signature
|
|
||||||
* @remarks
|
|
||||||
* This function extracts URLs from the object properties and calls maskSigUrl
|
|
||||||
* on each one to redact sensitive signature information. The function doesn't
|
|
||||||
* modify the original object; it only marks the signatures as secrets for
|
|
||||||
* logging purposes.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```typescript
|
|
||||||
* const responseBody = {
|
|
||||||
* signed_upload_url: 'https://blob.core.windows.net/?sig=abc123',
|
|
||||||
* signed_download_url: 'https://blob.core/windows.net/?sig=def456'
|
|
||||||
* };
|
|
||||||
* maskSecretUrls(responseBody);
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
function maskSecretUrls(body) {
|
|
||||||
if (typeof body !== 'object' || body === null) {
|
|
||||||
(0, core_1.debug)('body is not an object or is null');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ('signed_upload_url' in body &&
|
|
||||||
typeof body.signed_upload_url === 'string') {
|
|
||||||
maskSigUrl(body.signed_upload_url);
|
|
||||||
}
|
|
||||||
if ('signed_download_url' in body &&
|
|
||||||
typeof body.signed_download_url === 'string') {
|
|
||||||
maskSigUrl(body.signed_download_url);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.maskSecretUrls = maskSecretUrls;
|
|
||||||
//# sourceMappingURL=util.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5321:
|
/***/ 5321:
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||||
|
|
||||||
@@ -13417,7 +13334,7 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
const { parseSetCookie } = __nccwpck_require__(7803)
|
const { parseSetCookie } = __nccwpck_require__(7803)
|
||||||
const { stringify } = __nccwpck_require__(6338)
|
const { stringify, getHeadersList } = __nccwpck_require__(6338)
|
||||||
const { webidl } = __nccwpck_require__(8134)
|
const { webidl } = __nccwpck_require__(8134)
|
||||||
const { Headers } = __nccwpck_require__(9061)
|
const { Headers } = __nccwpck_require__(9061)
|
||||||
|
|
||||||
@@ -13493,13 +13410,14 @@ function getSetCookies (headers) {
|
|||||||
|
|
||||||
webidl.brandCheck(headers, Headers, { strict: false })
|
webidl.brandCheck(headers, Headers, { strict: false })
|
||||||
|
|
||||||
const cookies = headers.getSetCookie()
|
const cookies = getHeadersList(headers).cookies
|
||||||
|
|
||||||
if (!cookies) {
|
if (!cookies) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
return cookies.map((pair) => parseSetCookie(pair))
|
// In older versions of undici, cookies is a list of name:value.
|
||||||
|
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -13927,15 +13845,14 @@ module.exports = {
|
|||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 6338:
|
/***/ 6338:
|
||||||
/***/ ((module) => {
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
/**
|
const assert = __nccwpck_require__(2613)
|
||||||
* @param {string} value
|
const { kHeadersList } = __nccwpck_require__(9411)
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
|
||||||
function isCTLExcludingHtab (value) {
|
function isCTLExcludingHtab (value) {
|
||||||
if (value.length === 0) {
|
if (value.length === 0) {
|
||||||
return false
|
return false
|
||||||
@@ -14196,13 +14113,31 @@ function stringify (cookie) {
|
|||||||
return out.join('; ')
|
return out.join('; ')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let kHeadersListNode
|
||||||
|
|
||||||
|
function getHeadersList (headers) {
|
||||||
|
if (headers[kHeadersList]) {
|
||||||
|
return headers[kHeadersList]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!kHeadersListNode) {
|
||||||
|
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
|
||||||
|
(symbol) => symbol.description === 'headers list'
|
||||||
|
)
|
||||||
|
|
||||||
|
assert(kHeadersListNode, 'Headers cannot be parsed')
|
||||||
|
}
|
||||||
|
|
||||||
|
const headersList = headers[kHeadersListNode]
|
||||||
|
assert(headersList)
|
||||||
|
|
||||||
|
return headersList
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isCTLExcludingHtab,
|
isCTLExcludingHtab,
|
||||||
validateCookieName,
|
stringify,
|
||||||
validateCookiePath,
|
getHeadersList
|
||||||
validateCookieValue,
|
|
||||||
toIMFDate,
|
|
||||||
stringify
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -18206,7 +18141,6 @@ const {
|
|||||||
isValidHeaderName,
|
isValidHeaderName,
|
||||||
isValidHeaderValue
|
isValidHeaderValue
|
||||||
} = __nccwpck_require__(555)
|
} = __nccwpck_require__(555)
|
||||||
const util = __nccwpck_require__(9023)
|
|
||||||
const { webidl } = __nccwpck_require__(8134)
|
const { webidl } = __nccwpck_require__(8134)
|
||||||
const assert = __nccwpck_require__(2613)
|
const assert = __nccwpck_require__(2613)
|
||||||
|
|
||||||
@@ -18760,9 +18694,6 @@ Object.defineProperties(Headers.prototype, {
|
|||||||
[Symbol.toStringTag]: {
|
[Symbol.toStringTag]: {
|
||||||
value: 'Headers',
|
value: 'Headers',
|
||||||
configurable: true
|
configurable: true
|
||||||
},
|
|
||||||
[util.inspect.custom]: {
|
|
||||||
enumerable: false
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -27939,20 +27870,6 @@ class Pool extends PoolBase {
|
|||||||
? { ...options.interceptors }
|
? { ...options.interceptors }
|
||||||
: undefined
|
: undefined
|
||||||
this[kFactory] = factory
|
this[kFactory] = factory
|
||||||
|
|
||||||
this.on('connectionError', (origin, targets, error) => {
|
|
||||||
// If a connection error occurs, we remove the client from the pool,
|
|
||||||
// and emit a connectionError event. They will not be re-used.
|
|
||||||
// Fixes https://github.com/nodejs/undici/issues/3895
|
|
||||||
for (const target of targets) {
|
|
||||||
// Do not use kRemoveClient here, as it will close the client,
|
|
||||||
// but the client cannot be closed in this state.
|
|
||||||
const idx = this[kClients].indexOf(target)
|
|
||||||
if (idx !== -1) {
|
|
||||||
this[kClients].splice(idx, 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[kGetDispatcher] () {
|
[kGetDispatcher] () {
|
||||||
@@ -88715,8 +88632,7 @@ async function computeKeys() {
|
|||||||
const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : "";
|
const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : "";
|
||||||
const pythonVersion = await getPythonVersion();
|
const pythonVersion = await getPythonVersion();
|
||||||
const platform = await (0, platforms_1.getPlatform)();
|
const platform = await (0, platforms_1.getPlatform)();
|
||||||
const pruned = inputs_1.pruneCache ? "-pruned" : "";
|
return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${platform}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
|
||||||
return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${platform}-${pythonVersion}${pruned}${cacheDependencyPathHash}${suffix}`;
|
|
||||||
}
|
}
|
||||||
async function getPythonVersion() {
|
async function getPythonVersion() {
|
||||||
if (inputs_1.pythonVersion !== "") {
|
if (inputs_1.pythonVersion !== "") {
|
||||||
@@ -88732,7 +88648,7 @@ async function getPythonVersion() {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
const execArgs = ["python", "find", "--directory", inputs_1.workingDirectory];
|
const execArgs = ["python", "find"];
|
||||||
await exec.exec("uv", execArgs, options);
|
await exec.exec("uv", execArgs, options);
|
||||||
const pythonPath = output.trim();
|
const pythonPath = output.trim();
|
||||||
output = "";
|
output = "";
|
||||||
@@ -88998,14 +88914,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.manifestFile = exports.githubToken = exports.serverUrl = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.workingDirectory = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = void 0;
|
exports.githubToken = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.pythonVersion = exports.uvFile = exports.pyProjectFile = exports.version = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(7484));
|
const core = __importStar(__nccwpck_require__(7484));
|
||||||
const node_path_1 = __importDefault(__nccwpck_require__(6760));
|
const node_path_1 = __importDefault(__nccwpck_require__(6760));
|
||||||
exports.version = core.getInput("version");
|
exports.version = core.getInput("version");
|
||||||
exports.versionFile = core.getInput("version-file");
|
exports.pyProjectFile = core.getInput("pyproject-file");
|
||||||
|
exports.uvFile = core.getInput("uv-file");
|
||||||
exports.pythonVersion = core.getInput("python-version");
|
exports.pythonVersion = core.getInput("python-version");
|
||||||
exports.activateEnvironment = core.getBooleanInput("activate-environment");
|
|
||||||
exports.workingDirectory = core.getInput("working-directory");
|
|
||||||
exports.checkSum = core.getInput("checksum");
|
exports.checkSum = core.getInput("checksum");
|
||||||
exports.enableCache = getEnableCache();
|
exports.enableCache = getEnableCache();
|
||||||
exports.cacheSuffix = core.getInput("cache-suffix") || "";
|
exports.cacheSuffix = core.getInput("cache-suffix") || "";
|
||||||
@@ -89016,9 +88931,7 @@ exports.ignoreNothingToCache = core.getInput("ignore-nothing-to-cache") === "tru
|
|||||||
exports.ignoreEmptyWorkdir = core.getInput("ignore-empty-workdir") === "true";
|
exports.ignoreEmptyWorkdir = core.getInput("ignore-empty-workdir") === "true";
|
||||||
exports.toolBinDir = getToolBinDir();
|
exports.toolBinDir = getToolBinDir();
|
||||||
exports.toolDir = getToolDir();
|
exports.toolDir = getToolDir();
|
||||||
exports.serverUrl = core.getInput("server-url");
|
|
||||||
exports.githubToken = core.getInput("github-token");
|
exports.githubToken = core.getInput("github-token");
|
||||||
exports.manifestFile = getManifestFile();
|
|
||||||
function getEnableCache() {
|
function getEnableCache() {
|
||||||
const enableCacheInput = core.getInput("enable-cache");
|
const enableCacheInput = core.getInput("enable-cache");
|
||||||
if (enableCacheInput === "auto") {
|
if (enableCacheInput === "auto") {
|
||||||
@@ -89057,16 +88970,10 @@ function getCacheLocalPath() {
|
|||||||
if (cacheLocalPathInput !== "") {
|
if (cacheLocalPathInput !== "") {
|
||||||
return expandTilde(cacheLocalPathInput);
|
return expandTilde(cacheLocalPathInput);
|
||||||
}
|
}
|
||||||
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
|
if (process.env.RUNNER_TEMP !== undefined) {
|
||||||
if (process.env.RUNNER_TEMP !== undefined) {
|
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}setup-uv-cache`;
|
||||||
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}setup-uv-cache`;
|
|
||||||
}
|
|
||||||
throw Error("Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input");
|
|
||||||
}
|
}
|
||||||
if (process.platform === "win32") {
|
throw Error("Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input");
|
||||||
return `${process.env.APPDATA}${node_path_1.default.sep}uv${node_path_1.default.sep}cache`;
|
|
||||||
}
|
|
||||||
return `${process.env.HOME}${node_path_1.default.sep}.cache${node_path_1.default.sep}uv`;
|
|
||||||
}
|
}
|
||||||
function expandTilde(input) {
|
function expandTilde(input) {
|
||||||
if (input.startsWith("~")) {
|
if (input.startsWith("~")) {
|
||||||
@@ -89074,13 +88981,6 @@ function expandTilde(input) {
|
|||||||
}
|
}
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
function getManifestFile() {
|
|
||||||
const manifestFileInput = core.getInput("manifest-file");
|
|
||||||
if (manifestFileInput !== "") {
|
|
||||||
return manifestFileInput;
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -91096,7 +90996,7 @@ module.exports = parseParams
|
|||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.3","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.2","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|||||||
2968
dist/setup/index.js
generated
vendored
2968
dist/setup/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
1757
dist/update-known-versions/index.js → dist/update-known-checksums/index.js
generated
vendored
1757
dist/update-known-versions/index.js → dist/update-known-checksums/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
480
package-lock.json
generated
480
package-lock.json
generated
@@ -9,36 +9,33 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^4.0.3",
|
"@actions/cache": "^4.0.2",
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/glob": "^0.5.0",
|
"@actions/glob": "^0.5.0",
|
||||||
"@actions/io": "^1.1.3",
|
"@actions/io": "^1.1.3",
|
||||||
"@actions/tool-cache": "^2.0.2",
|
"@actions/tool-cache": "^2.0.2",
|
||||||
"@octokit/core": "^7.0.2",
|
"@octokit/core": "^6.1.4",
|
||||||
"@octokit/plugin-paginate-rest": "^13.1.1",
|
"@octokit/plugin-paginate-rest": "^11.4.3",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^16.0.0",
|
"@octokit/plugin-rest-endpoint-methods": "^13.3.1",
|
||||||
"@renovatebot/pep440": "^4.1.0",
|
"smol-toml": "^1.3.1",
|
||||||
"smol-toml": "^1.3.4",
|
"undici": "^7.5.0"
|
||||||
"undici": "^7.10.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.9.4",
|
"@biomejs/biome": "1.9.4",
|
||||||
"@types/js-yaml": "^4.0.9",
|
"@types/node": "^22.13.10",
|
||||||
"@types/node": "^24.0.14",
|
"@types/semver": "^7.5.8",
|
||||||
"@types/semver": "^7.7.0",
|
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"ts-jest": "^29.4.0",
|
"ts-jest": "^29.2.6",
|
||||||
"typescript": "^5.8.3"
|
"typescript": "^5.8.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/cache": {
|
"node_modules/@actions/cache": {
|
||||||
"version": "4.0.3",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.0.2.tgz",
|
||||||
"integrity": "sha512-SvrqFtYJ7I48A/uXNkoJrnukx5weQv1fGquhs3+4nkByZThBH109KTIqj5x/cGV7JGNvb8dLPVywUOqX1fjiXg==",
|
"integrity": "sha512-cBr7JL1q+JKjbBd3w3SZN5OQ1Xg+/D8QLMcE7MpgpghZlL4biBO0ZEeraoTxCZyfN0YY0dxXlLgsgGv/sT5BTg==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
"@actions/exec": "^1.0.1",
|
"@actions/exec": "^1.0.1",
|
||||||
@@ -97,10 +94,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/http-client/node_modules/undici": {
|
"node_modules/@actions/http-client/node_modules/undici": {
|
||||||
"version": "5.29.0",
|
"version": "5.28.5",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
|
||||||
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
|
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fastify/busboy": "^2.0.0"
|
"@fastify/busboy": "^2.0.0"
|
||||||
},
|
},
|
||||||
@@ -1514,130 +1510,120 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/auth-token": {
|
"node_modules/@octokit/auth-token": {
|
||||||
"version": "6.0.0",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz",
|
||||||
"integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==",
|
"integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==",
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/core": {
|
"node_modules/@octokit/core": {
|
||||||
"version": "7.0.2",
|
"version": "6.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.4.tgz",
|
||||||
"integrity": "sha512-ODsoD39Lq6vR6aBgvjTnA3nZGliknKboc9Gtxr7E4WDNqY24MxANKcuDQSF0jzapvGb3KWOEDrKfve4HoWGK+g==",
|
"integrity": "sha512-lAS9k7d6I0MPN+gb9bKDt7X8SdxknYqAMh44S5L+lNqIN2NuV8nvv3g8rPp7MuRxcOpxpUIATWprO0C34a8Qmg==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/auth-token": "^6.0.0",
|
"@octokit/auth-token": "^5.0.0",
|
||||||
"@octokit/graphql": "^9.0.1",
|
"@octokit/graphql": "^8.1.2",
|
||||||
"@octokit/request": "^10.0.2",
|
"@octokit/request": "^9.2.1",
|
||||||
"@octokit/request-error": "^7.0.0",
|
"@octokit/request-error": "^6.1.7",
|
||||||
"@octokit/types": "^14.0.0",
|
"@octokit/types": "^13.6.2",
|
||||||
"before-after-hook": "^4.0.0",
|
"before-after-hook": "^3.0.2",
|
||||||
"universal-user-agent": "^7.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/endpoint": {
|
"node_modules/@octokit/endpoint": {
|
||||||
"version": "11.0.0",
|
"version": "10.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz",
|
||||||
"integrity": "sha512-hoYicJZaqISMAI3JfaDr1qMNi48OctWuOih1m80bkYow/ayPw6Jj52tqWJ6GEoFTk1gBqfanSoI1iY99Z5+ekQ==",
|
"integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^14.0.0",
|
"@octokit/types": "^13.6.2",
|
||||||
"universal-user-agent": "^7.0.2"
|
"universal-user-agent": "^7.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/graphql": {
|
"node_modules/@octokit/graphql": {
|
||||||
"version": "9.0.1",
|
"version": "8.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.2.tgz",
|
||||||
"integrity": "sha512-j1nQNU1ZxNFx2ZtKmL4sMrs4egy5h65OMDmSbVyuCzjOcwsHq6EaYjOTGXPQxgfiN8dJ4CriYHk6zF050WEULg==",
|
"integrity": "sha512-bdlj/CJVjpaz06NBpfHhp4kGJaRZfz7AzC+6EwUImRtrwIw8dIgJ63Xg0OzV9pRn3rIzrt5c2sa++BL0JJ8GLw==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/request": "^10.0.2",
|
"@octokit/request": "^9.1.4",
|
||||||
"@octokit/types": "^14.0.0",
|
"@octokit/types": "^13.6.2",
|
||||||
"universal-user-agent": "^7.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/openapi-types": {
|
"node_modules/@octokit/openapi-types": {
|
||||||
"version": "25.1.0",
|
"version": "23.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-25.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
|
||||||
"integrity": "sha512-idsIggNXUKkk0+BExUn1dQ92sfysJrje03Q0bv0e+KPLrvyqZF8MnBpFz8UNfYDwB3Ie7Z0TByjWfzxt7vseaA==",
|
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
|
||||||
"license": "MIT"
|
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-paginate-rest": {
|
"node_modules/@octokit/plugin-paginate-rest": {
|
||||||
"version": "13.1.1",
|
"version": "11.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-13.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.3.tgz",
|
||||||
"integrity": "sha512-q9iQGlZlxAVNRN2jDNskJW/Cafy7/XE52wjZ5TTvyhyOD904Cvx//DNyoO3J/MXJ0ve3rPoNWKEg5iZrisQSuw==",
|
"integrity": "sha512-tBXaAbXkqVJlRoA/zQVe9mUdb8rScmivqtpv3ovsC5xhje/a+NOCivs7eUhWBwCApJVsR4G5HMeaLbq7PxqZGA==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^14.1.0"
|
"@octokit/types": "^13.7.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 18"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@octokit/core": ">=6"
|
"@octokit/core": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||||
"version": "16.0.0",
|
"version": "13.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-16.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.1.tgz",
|
||||||
"integrity": "sha512-kJVUQk6/dx/gRNLWUnAWKFs1kVPn5O5CYZyssyEoNYaFedqZxsfYs7DwI3d67hGz4qOwaJ1dpm07hOAD1BXx6g==",
|
"integrity": "sha512-o8uOBdsyR+WR8MK9Cco8dCgvG13H1RlM1nWnK/W7TEACQBFux/vPREgKucxUfuDQ5yi1T3hGf4C5ZmZXAERgwQ==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^14.1.0"
|
"@octokit/types": "^13.8.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 18"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@octokit/core": ">=6"
|
"@octokit/core": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/request": {
|
"node_modules/@octokit/request": {
|
||||||
"version": "10.0.2",
|
"version": "9.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz",
|
||||||
"integrity": "sha512-iYj4SJG/2bbhh+iIpFmG5u49DtJ4lipQ+aPakjL9OKpsGY93wM8w06gvFbEQxcMsZcCvk5th5KkIm2m8o14aWA==",
|
"integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/endpoint": "^11.0.0",
|
"@octokit/endpoint": "^10.1.3",
|
||||||
"@octokit/request-error": "^7.0.0",
|
"@octokit/request-error": "^6.1.7",
|
||||||
"@octokit/types": "^14.0.0",
|
"@octokit/types": "^13.6.2",
|
||||||
"fast-content-type-parse": "^3.0.0",
|
"fast-content-type-parse": "^2.0.0",
|
||||||
"universal-user-agent": "^7.0.2"
|
"universal-user-agent": "^7.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/request-error": {
|
"node_modules/@octokit/request-error": {
|
||||||
"version": "7.0.0",
|
"version": "6.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz",
|
||||||
"integrity": "sha512-KRA7VTGdVyJlh0cP5Tf94hTiYVVqmt2f3I6mnimmaVz4UG3gQV/k4mDJlJv3X67iX6rmN7gSHCF8ssqeMnmhZg==",
|
"integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^14.0.0"
|
"@octokit/types": "^13.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/types": {
|
"node_modules/@octokit/types": {
|
||||||
"version": "14.1.0",
|
"version": "13.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
|
||||||
"integrity": "sha512-1y6DgTy8Jomcpu33N+p5w58l6xyt55Ar2I91RPiIA0xCJBXyUAhXCcmZaDWSANiha7R9a6qJJ2CRomGPZ6f46g==",
|
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/openapi-types": "^25.1.0"
|
"@octokit/openapi-types": "^23.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@opentelemetry/api": {
|
"node_modules/@opentelemetry/api": {
|
||||||
@@ -1718,16 +1704,6 @@
|
|||||||
"@protobuf-ts/runtime": "^2.9.4"
|
"@protobuf-ts/runtime": "^2.9.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@renovatebot/pep440": {
|
|
||||||
"version": "4.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@renovatebot/pep440/-/pep440-4.1.0.tgz",
|
|
||||||
"integrity": "sha512-mo2RxnOSp78Njt1HmgMwjl6FapP4OyIS8HypJlymCvN7AIV2Xf5PmZfl/E3O1WWZ6IjKrfsEAaPWFMi8tnkq3g==",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"engines": {
|
|
||||||
"node": "^20.9.0 || ^22.11.0",
|
|
||||||
"pnpm": "^9.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@sinclair/typebox": {
|
"node_modules/@sinclair/typebox": {
|
||||||
"version": "0.27.8",
|
"version": "0.27.8",
|
||||||
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
|
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
|
||||||
@@ -1826,20 +1802,12 @@
|
|||||||
"@types/istanbul-lib-report": "*"
|
"@types/istanbul-lib-report": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/js-yaml": {
|
|
||||||
"version": "4.0.9",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz",
|
|
||||||
"integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "24.0.14",
|
"version": "22.13.10",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.14.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz",
|
||||||
"integrity": "sha512-4zXMWD91vBLGRtHK3YbIoFMia+1nqEz72coM42C5ETjnNCa/heoj7NT1G67iAfOqMmcfhuCZ4uNpyz8EjlAejw==",
|
"integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~7.8.0"
|
"undici-types": "~6.20.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/node-fetch": {
|
"node_modules/@types/node-fetch": {
|
||||||
@@ -1865,11 +1833,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/semver": {
|
"node_modules/@types/semver": {
|
||||||
"version": "7.7.0",
|
"version": "7.5.8",
|
||||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz",
|
||||||
"integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==",
|
"integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"license": "MIT"
|
|
||||||
},
|
},
|
||||||
"node_modules/@types/stack-utils": {
|
"node_modules/@types/stack-utils": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
@@ -2098,10 +2065,9 @@
|
|||||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||||
},
|
},
|
||||||
"node_modules/before-after-hook": {
|
"node_modules/before-after-hook": {
|
||||||
"version": "4.0.0",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz",
|
||||||
"integrity": "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==",
|
"integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A=="
|
||||||
"license": "Apache-2.0"
|
|
||||||
},
|
},
|
||||||
"node_modules/brace-expansion": {
|
"node_modules/brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
@@ -2569,9 +2535,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/fast-content-type-parse": {
|
"node_modules/fast-content-type-parse": {
|
||||||
"version": "3.0.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz",
|
||||||
"integrity": "sha512-ZvLdcY8P+N8mGQJahJV5G4U88CSvT1rP8ApL6uETe88MBXrBHAkZlSEySdUlyztF7ccb+Znos3TFqaepHxdhBg==",
|
"integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
@@ -2581,8 +2547,7 @@
|
|||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
"url": "https://opencollective.com/fastify"
|
"url": "https://opencollective.com/fastify"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"license": "MIT"
|
|
||||||
},
|
},
|
||||||
"node_modules/fast-json-stable-stringify": {
|
"node_modules/fast-json-stable-stringify": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
@@ -4205,10 +4170,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/smol-toml": {
|
"node_modules/smol-toml": {
|
||||||
"version": "1.3.4",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.3.1.tgz",
|
||||||
"integrity": "sha512-UOPtVuYkzYGee0Bd2Szz8d2G3RfMfJ2t3qVdZUAozZyAk+a0Sxa+QKix0YCwjL/A1RR0ar44nCxaoN9FxdJGwA==",
|
"integrity": "sha512-tEYNll18pPKHroYSmLLrksq233j021G0giwW7P3D24jC54pQ5W5BXMsQ/Mvw1OJCmEYDgY+lrzT+3nNUtoNfXQ==",
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
},
|
},
|
||||||
@@ -4384,20 +4348,19 @@
|
|||||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||||
},
|
},
|
||||||
"node_modules/ts-jest": {
|
"node_modules/ts-jest": {
|
||||||
"version": "29.4.0",
|
"version": "29.2.6",
|
||||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.6.tgz",
|
||||||
"integrity": "sha512-d423TJMnJGu80/eSgfQ5w/R+0zFJvdtTxwtF9KzFFunOpSeD+79lHJQIiAhluJoyGRbvj9NZJsl9WjCUo0ND7Q==",
|
"integrity": "sha512-yTNZVZqc8lSixm+QGVFcPe6+yj7+TWZwIesuOWvfcn4B9bz5x4NDzVCQQjOs7Hfouu36aEqfEbo9Qpo+gq8dDg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bs-logger": "^0.2.6",
|
"bs-logger": "^0.2.6",
|
||||||
"ejs": "^3.1.10",
|
"ejs": "^3.1.10",
|
||||||
"fast-json-stable-stringify": "^2.1.0",
|
"fast-json-stable-stringify": "^2.1.0",
|
||||||
|
"jest-util": "^29.0.0",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"lodash.memoize": "^4.1.2",
|
"lodash.memoize": "^4.1.2",
|
||||||
"make-error": "^1.3.6",
|
"make-error": "^1.3.6",
|
||||||
"semver": "^7.7.2",
|
"semver": "^7.7.1",
|
||||||
"type-fest": "^4.41.0",
|
|
||||||
"yargs-parser": "^21.1.1"
|
"yargs-parser": "^21.1.1"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -4408,11 +4371,10 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@babel/core": ">=7.0.0-beta.0 <8",
|
"@babel/core": ">=7.0.0-beta.0 <8",
|
||||||
"@jest/transform": "^29.0.0 || ^30.0.0",
|
"@jest/transform": "^29.0.0",
|
||||||
"@jest/types": "^29.0.0 || ^30.0.0",
|
"@jest/types": "^29.0.0",
|
||||||
"babel-jest": "^29.0.0 || ^30.0.0",
|
"babel-jest": "^29.0.0",
|
||||||
"jest": "^29.0.0 || ^30.0.0",
|
"jest": "^29.0.0",
|
||||||
"jest-util": "^29.0.0 || ^30.0.0",
|
|
||||||
"typescript": ">=4.3 <6"
|
"typescript": ">=4.3 <6"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
@@ -4430,18 +4392,14 @@
|
|||||||
},
|
},
|
||||||
"esbuild": {
|
"esbuild": {
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
|
||||||
"jest-util": {
|
|
||||||
"optional": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ts-jest/node_modules/semver": {
|
"node_modules/ts-jest/node_modules/semver": {
|
||||||
"version": "7.7.2",
|
"version": "7.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
|
||||||
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC",
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "bin/semver.js"
|
"semver": "bin/semver.js"
|
||||||
},
|
},
|
||||||
@@ -4471,25 +4429,11 @@
|
|||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/type-fest": {
|
|
||||||
"version": "4.41.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz",
|
|
||||||
"integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "(MIT OR CC0-1.0)",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.8.3",
|
"version": "5.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz",
|
||||||
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
"integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "Apache-2.0",
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
"tsserver": "bin/tsserver"
|
"tsserver": "bin/tsserver"
|
||||||
@@ -4499,25 +4443,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "7.10.0",
|
"version": "7.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-7.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-7.5.0.tgz",
|
||||||
"integrity": "sha512-u5otvFBOBZvmdjWLVW+5DAc9Nkq8f24g0O9oY7qw2JVIF1VocIFoyz9JFkuVOS2j41AufeO0xnlweJ2RLT8nGw==",
|
"integrity": "sha512-NFQG741e8mJ0fLQk90xKxFdaSM7z4+IQpAgsFI36bCDY9Z2+aXXZjVy2uUksMouWfMI9+w5ejOq5zYYTBCQJDQ==",
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.18.1"
|
"node": ">=20.18.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici-types": {
|
"node_modules/undici-types": {
|
||||||
"version": "7.8.0",
|
"version": "6.20.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
|
||||||
"integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
|
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="
|
||||||
"license": "MIT"
|
|
||||||
},
|
},
|
||||||
"node_modules/universal-user-agent": {
|
"node_modules/universal-user-agent": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz",
|
||||||
"integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==",
|
"integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q=="
|
||||||
"license": "ISC"
|
|
||||||
},
|
},
|
||||||
"node_modules/update-browserslist-db": {
|
"node_modules/update-browserslist-db": {
|
||||||
"version": "1.0.10",
|
"version": "1.0.10",
|
||||||
@@ -4716,9 +4657,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": {
|
"@actions/cache": {
|
||||||
"version": "4.0.3",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.0.2.tgz",
|
||||||
"integrity": "sha512-SvrqFtYJ7I48A/uXNkoJrnukx5weQv1fGquhs3+4nkByZThBH109KTIqj5x/cGV7JGNvb8dLPVywUOqX1fjiXg==",
|
"integrity": "sha512-cBr7JL1q+JKjbBd3w3SZN5OQ1Xg+/D8QLMcE7MpgpghZlL4biBO0ZEeraoTxCZyfN0YY0dxXlLgsgGv/sT5BTg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
"@actions/exec": "^1.0.1",
|
"@actions/exec": "^1.0.1",
|
||||||
@@ -4779,9 +4720,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici": {
|
"undici": {
|
||||||
"version": "5.29.0",
|
"version": "5.28.5",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
|
||||||
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
|
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@fastify/busboy": "^2.0.0"
|
"@fastify/busboy": "^2.0.0"
|
||||||
}
|
}
|
||||||
@@ -5847,90 +5788,90 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/auth-token": {
|
"@octokit/auth-token": {
|
||||||
"version": "6.0.0",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz",
|
||||||
"integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w=="
|
"integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw=="
|
||||||
},
|
},
|
||||||
"@octokit/core": {
|
"@octokit/core": {
|
||||||
"version": "7.0.2",
|
"version": "6.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.4.tgz",
|
||||||
"integrity": "sha512-ODsoD39Lq6vR6aBgvjTnA3nZGliknKboc9Gtxr7E4WDNqY24MxANKcuDQSF0jzapvGb3KWOEDrKfve4HoWGK+g==",
|
"integrity": "sha512-lAS9k7d6I0MPN+gb9bKDt7X8SdxknYqAMh44S5L+lNqIN2NuV8nvv3g8rPp7MuRxcOpxpUIATWprO0C34a8Qmg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/auth-token": "^6.0.0",
|
"@octokit/auth-token": "^5.0.0",
|
||||||
"@octokit/graphql": "^9.0.1",
|
"@octokit/graphql": "^8.1.2",
|
||||||
"@octokit/request": "^10.0.2",
|
"@octokit/request": "^9.2.1",
|
||||||
"@octokit/request-error": "^7.0.0",
|
"@octokit/request-error": "^6.1.7",
|
||||||
"@octokit/types": "^14.0.0",
|
"@octokit/types": "^13.6.2",
|
||||||
"before-after-hook": "^4.0.0",
|
"before-after-hook": "^3.0.2",
|
||||||
"universal-user-agent": "^7.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/endpoint": {
|
"@octokit/endpoint": {
|
||||||
"version": "11.0.0",
|
"version": "10.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz",
|
||||||
"integrity": "sha512-hoYicJZaqISMAI3JfaDr1qMNi48OctWuOih1m80bkYow/ayPw6Jj52tqWJ6GEoFTk1gBqfanSoI1iY99Z5+ekQ==",
|
"integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/types": "^14.0.0",
|
"@octokit/types": "^13.6.2",
|
||||||
"universal-user-agent": "^7.0.2"
|
"universal-user-agent": "^7.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/graphql": {
|
"@octokit/graphql": {
|
||||||
"version": "9.0.1",
|
"version": "8.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.2.tgz",
|
||||||
"integrity": "sha512-j1nQNU1ZxNFx2ZtKmL4sMrs4egy5h65OMDmSbVyuCzjOcwsHq6EaYjOTGXPQxgfiN8dJ4CriYHk6zF050WEULg==",
|
"integrity": "sha512-bdlj/CJVjpaz06NBpfHhp4kGJaRZfz7AzC+6EwUImRtrwIw8dIgJ63Xg0OzV9pRn3rIzrt5c2sa++BL0JJ8GLw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/request": "^10.0.2",
|
"@octokit/request": "^9.1.4",
|
||||||
"@octokit/types": "^14.0.0",
|
"@octokit/types": "^13.6.2",
|
||||||
"universal-user-agent": "^7.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/openapi-types": {
|
"@octokit/openapi-types": {
|
||||||
"version": "25.1.0",
|
"version": "23.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-25.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
|
||||||
"integrity": "sha512-idsIggNXUKkk0+BExUn1dQ92sfysJrje03Q0bv0e+KPLrvyqZF8MnBpFz8UNfYDwB3Ie7Z0TByjWfzxt7vseaA=="
|
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
|
||||||
},
|
},
|
||||||
"@octokit/plugin-paginate-rest": {
|
"@octokit/plugin-paginate-rest": {
|
||||||
"version": "13.1.1",
|
"version": "11.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-13.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.3.tgz",
|
||||||
"integrity": "sha512-q9iQGlZlxAVNRN2jDNskJW/Cafy7/XE52wjZ5TTvyhyOD904Cvx//DNyoO3J/MXJ0ve3rPoNWKEg5iZrisQSuw==",
|
"integrity": "sha512-tBXaAbXkqVJlRoA/zQVe9mUdb8rScmivqtpv3ovsC5xhje/a+NOCivs7eUhWBwCApJVsR4G5HMeaLbq7PxqZGA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/types": "^14.1.0"
|
"@octokit/types": "^13.7.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/plugin-rest-endpoint-methods": {
|
"@octokit/plugin-rest-endpoint-methods": {
|
||||||
"version": "16.0.0",
|
"version": "13.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-16.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.1.tgz",
|
||||||
"integrity": "sha512-kJVUQk6/dx/gRNLWUnAWKFs1kVPn5O5CYZyssyEoNYaFedqZxsfYs7DwI3d67hGz4qOwaJ1dpm07hOAD1BXx6g==",
|
"integrity": "sha512-o8uOBdsyR+WR8MK9Cco8dCgvG13H1RlM1nWnK/W7TEACQBFux/vPREgKucxUfuDQ5yi1T3hGf4C5ZmZXAERgwQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/types": "^14.1.0"
|
"@octokit/types": "^13.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/request": {
|
"@octokit/request": {
|
||||||
"version": "10.0.2",
|
"version": "9.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz",
|
||||||
"integrity": "sha512-iYj4SJG/2bbhh+iIpFmG5u49DtJ4lipQ+aPakjL9OKpsGY93wM8w06gvFbEQxcMsZcCvk5th5KkIm2m8o14aWA==",
|
"integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/endpoint": "^11.0.0",
|
"@octokit/endpoint": "^10.1.3",
|
||||||
"@octokit/request-error": "^7.0.0",
|
"@octokit/request-error": "^6.1.7",
|
||||||
"@octokit/types": "^14.0.0",
|
"@octokit/types": "^13.6.2",
|
||||||
"fast-content-type-parse": "^3.0.0",
|
"fast-content-type-parse": "^2.0.0",
|
||||||
"universal-user-agent": "^7.0.2"
|
"universal-user-agent": "^7.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/request-error": {
|
"@octokit/request-error": {
|
||||||
"version": "7.0.0",
|
"version": "6.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz",
|
||||||
"integrity": "sha512-KRA7VTGdVyJlh0cP5Tf94hTiYVVqmt2f3I6mnimmaVz4UG3gQV/k4mDJlJv3X67iX6rmN7gSHCF8ssqeMnmhZg==",
|
"integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/types": "^14.0.0"
|
"@octokit/types": "^13.6.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/types": {
|
"@octokit/types": {
|
||||||
"version": "14.1.0",
|
"version": "13.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
|
||||||
"integrity": "sha512-1y6DgTy8Jomcpu33N+p5w58l6xyt55Ar2I91RPiIA0xCJBXyUAhXCcmZaDWSANiha7R9a6qJJ2CRomGPZ6f46g==",
|
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/openapi-types": "^25.1.0"
|
"@octokit/openapi-types": "^23.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@opentelemetry/api": {
|
"@opentelemetry/api": {
|
||||||
@@ -5991,11 +5932,6 @@
|
|||||||
"@protobuf-ts/runtime": "^2.9.4"
|
"@protobuf-ts/runtime": "^2.9.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@renovatebot/pep440": {
|
|
||||||
"version": "4.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@renovatebot/pep440/-/pep440-4.1.0.tgz",
|
|
||||||
"integrity": "sha512-mo2RxnOSp78Njt1HmgMwjl6FapP4OyIS8HypJlymCvN7AIV2Xf5PmZfl/E3O1WWZ6IjKrfsEAaPWFMi8tnkq3g=="
|
|
||||||
},
|
|
||||||
"@sinclair/typebox": {
|
"@sinclair/typebox": {
|
||||||
"version": "0.27.8",
|
"version": "0.27.8",
|
||||||
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
|
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
|
||||||
@@ -6094,18 +6030,12 @@
|
|||||||
"@types/istanbul-lib-report": "*"
|
"@types/istanbul-lib-report": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/js-yaml": {
|
|
||||||
"version": "4.0.9",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz",
|
|
||||||
"integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "24.0.14",
|
"version": "22.13.10",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.14.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz",
|
||||||
"integrity": "sha512-4zXMWD91vBLGRtHK3YbIoFMia+1nqEz72coM42C5ETjnNCa/heoj7NT1G67iAfOqMmcfhuCZ4uNpyz8EjlAejw==",
|
"integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"undici-types": "~7.8.0"
|
"undici-types": "~6.20.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/node-fetch": {
|
"@types/node-fetch": {
|
||||||
@@ -6130,9 +6060,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/semver": {
|
"@types/semver": {
|
||||||
"version": "7.7.0",
|
"version": "7.5.8",
|
||||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz",
|
||||||
"integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==",
|
"integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/stack-utils": {
|
"@types/stack-utils": {
|
||||||
@@ -6313,9 +6243,9 @@
|
|||||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||||
},
|
},
|
||||||
"before-after-hook": {
|
"before-after-hook": {
|
||||||
"version": "4.0.0",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz",
|
||||||
"integrity": "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ=="
|
"integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A=="
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
@@ -6634,9 +6564,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fast-content-type-parse": {
|
"fast-content-type-parse": {
|
||||||
"version": "3.0.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz",
|
||||||
"integrity": "sha512-ZvLdcY8P+N8mGQJahJV5G4U88CSvT1rP8ApL6uETe88MBXrBHAkZlSEySdUlyztF7ccb+Znos3TFqaepHxdhBg=="
|
"integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q=="
|
||||||
},
|
},
|
||||||
"fast-json-stable-stringify": {
|
"fast-json-stable-stringify": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
@@ -7854,9 +7784,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"smol-toml": {
|
"smol-toml": {
|
||||||
"version": "1.3.4",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.3.1.tgz",
|
||||||
"integrity": "sha512-UOPtVuYkzYGee0Bd2Szz8d2G3RfMfJ2t3qVdZUAozZyAk+a0Sxa+QKix0YCwjL/A1RR0ar44nCxaoN9FxdJGwA=="
|
"integrity": "sha512-tEYNll18pPKHroYSmLLrksq233j021G0giwW7P3D24jC54pQ5W5BXMsQ/Mvw1OJCmEYDgY+lrzT+3nNUtoNfXQ=="
|
||||||
},
|
},
|
||||||
"source-map": {
|
"source-map": {
|
||||||
"version": "0.6.1",
|
"version": "0.6.1",
|
||||||
@@ -7986,26 +7916,26 @@
|
|||||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||||
},
|
},
|
||||||
"ts-jest": {
|
"ts-jest": {
|
||||||
"version": "29.4.0",
|
"version": "29.2.6",
|
||||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.6.tgz",
|
||||||
"integrity": "sha512-d423TJMnJGu80/eSgfQ5w/R+0zFJvdtTxwtF9KzFFunOpSeD+79lHJQIiAhluJoyGRbvj9NZJsl9WjCUo0ND7Q==",
|
"integrity": "sha512-yTNZVZqc8lSixm+QGVFcPe6+yj7+TWZwIesuOWvfcn4B9bz5x4NDzVCQQjOs7Hfouu36aEqfEbo9Qpo+gq8dDg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"bs-logger": "^0.2.6",
|
"bs-logger": "^0.2.6",
|
||||||
"ejs": "^3.1.10",
|
"ejs": "^3.1.10",
|
||||||
"fast-json-stable-stringify": "^2.1.0",
|
"fast-json-stable-stringify": "^2.1.0",
|
||||||
|
"jest-util": "^29.0.0",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"lodash.memoize": "^4.1.2",
|
"lodash.memoize": "^4.1.2",
|
||||||
"make-error": "^1.3.6",
|
"make-error": "^1.3.6",
|
||||||
"semver": "^7.7.2",
|
"semver": "^7.7.1",
|
||||||
"type-fest": "^4.41.0",
|
|
||||||
"yargs-parser": "^21.1.1"
|
"yargs-parser": "^21.1.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "7.7.2",
|
"version": "7.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
|
||||||
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8026,32 +7956,26 @@
|
|||||||
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
|
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"type-fest": {
|
|
||||||
"version": "4.41.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz",
|
|
||||||
"integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "5.8.3",
|
"version": "5.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz",
|
||||||
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
"integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"undici": {
|
"undici": {
|
||||||
"version": "7.10.0",
|
"version": "7.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-7.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-7.5.0.tgz",
|
||||||
"integrity": "sha512-u5otvFBOBZvmdjWLVW+5DAc9Nkq8f24g0O9oY7qw2JVIF1VocIFoyz9JFkuVOS2j41AufeO0xnlweJ2RLT8nGw=="
|
"integrity": "sha512-NFQG741e8mJ0fLQk90xKxFdaSM7z4+IQpAgsFI36bCDY9Z2+aXXZjVy2uUksMouWfMI9+w5ejOq5zYYTBCQJDQ=="
|
||||||
},
|
},
|
||||||
"undici-types": {
|
"undici-types": {
|
||||||
"version": "7.8.0",
|
"version": "6.20.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
|
||||||
"integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw=="
|
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="
|
||||||
},
|
},
|
||||||
"universal-user-agent": {
|
"universal-user-agent": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz",
|
||||||
"integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A=="
|
"integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q=="
|
||||||
},
|
},
|
||||||
"update-browserslist-db": {
|
"update-browserslist-db": {
|
||||||
"version": "1.0.10",
|
"version": "1.0.10",
|
||||||
|
|||||||
26
package.json
26
package.json
@@ -9,10 +9,10 @@
|
|||||||
"format": "biome format --fix",
|
"format": "biome format --fix",
|
||||||
"format-check": "biome format",
|
"format-check": "biome format",
|
||||||
"lint": "biome lint --fix",
|
"lint": "biome lint --fix",
|
||||||
"package": "ncc build -o dist/setup src/setup-uv.ts && ncc build -o dist/save-cache src/save-cache.ts && ncc build -o dist/update-known-versions src/update-known-versions.ts",
|
"package": "ncc build -o dist/setup src/setup-uv.ts && ncc build -o dist/save-cache src/save-cache.ts && ncc build -o dist/update-known-checksums src/update-known-checksums.ts",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"act": "act pull_request -W .github/workflows/test.yml --container-architecture linux/amd64 -s GITHUB_TOKEN=\"$(gh auth token)\"",
|
"act": "act pull_request -W .github/workflows/test.yml --container-architecture linux/amd64 -s GITHUB_TOKEN=\"$(gh auth token)\"",
|
||||||
"update-known-versions": "RUNNER_TEMP=known_versions node dist/update-known-versions/index.js src/download/checksum/known-versions.ts \"$(gh auth token)\"",
|
"update-known-checksums": "RUNNER_TEMP=known_checksums node dist/update-known-checksums/index.js src/download/checksum/known-checksums.ts \"$(gh auth token)\"",
|
||||||
"all": "npm run build && npm run format && npm run lint && npm run package && npm test"
|
"all": "npm run build && npm run format && npm run lint && npm run package && npm test"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -23,28 +23,26 @@
|
|||||||
"author": "@eifinger",
|
"author": "@eifinger",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^4.0.3",
|
"@actions/cache": "^4.0.2",
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/glob": "^0.5.0",
|
"@actions/glob": "^0.5.0",
|
||||||
"@actions/io": "^1.1.3",
|
"@actions/io": "^1.1.3",
|
||||||
"@actions/tool-cache": "^2.0.2",
|
"@actions/tool-cache": "^2.0.2",
|
||||||
"@octokit/core": "^7.0.2",
|
"@octokit/core": "^6.1.4",
|
||||||
"@octokit/plugin-paginate-rest": "^13.1.1",
|
"@octokit/plugin-paginate-rest": "^11.4.3",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^16.0.0",
|
"@octokit/plugin-rest-endpoint-methods": "^13.3.1",
|
||||||
"@renovatebot/pep440": "^4.1.0",
|
"undici": "^7.5.0",
|
||||||
"smol-toml": "^1.3.4",
|
"smol-toml": "^1.3.1"
|
||||||
"undici": "^7.10.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.9.4",
|
"@biomejs/biome": "1.9.4",
|
||||||
"@types/js-yaml": "^4.0.9",
|
"@types/node": "^22.13.10",
|
||||||
"@types/node": "^24.0.14",
|
"@types/semver": "^7.5.8",
|
||||||
"@types/semver": "^7.7.0",
|
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"ts-jest": "^29.4.0",
|
"ts-jest": "^29.2.6",
|
||||||
"typescript": "^5.8.3"
|
"typescript": "^5.8.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
src/cache/restore-cache.ts
vendored
7
src/cache/restore-cache.ts
vendored
@@ -4,9 +4,7 @@ import {
|
|||||||
cacheDependencyGlob,
|
cacheDependencyGlob,
|
||||||
cacheLocalPath,
|
cacheLocalPath,
|
||||||
cacheSuffix,
|
cacheSuffix,
|
||||||
pruneCache,
|
|
||||||
pythonVersion as pythonVersionInput,
|
pythonVersion as pythonVersionInput,
|
||||||
workingDirectory,
|
|
||||||
} from "../utils/inputs";
|
} from "../utils/inputs";
|
||||||
import { getArch, getPlatform } from "../utils/platforms";
|
import { getArch, getPlatform } from "../utils/platforms";
|
||||||
import { hashFiles } from "../hash/hash-files";
|
import { hashFiles } from "../hash/hash-files";
|
||||||
@@ -56,8 +54,7 @@ async function computeKeys(): Promise<string> {
|
|||||||
const suffix = cacheSuffix ? `-${cacheSuffix}` : "";
|
const suffix = cacheSuffix ? `-${cacheSuffix}` : "";
|
||||||
const pythonVersion = await getPythonVersion();
|
const pythonVersion = await getPythonVersion();
|
||||||
const platform = await getPlatform();
|
const platform = await getPlatform();
|
||||||
const pruned = pruneCache ? "-pruned" : "";
|
return `setup-uv-${CACHE_VERSION}-${getArch()}-${platform}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
|
||||||
return `setup-uv-${CACHE_VERSION}-${getArch()}-${platform}-${pythonVersion}${pruned}${cacheDependencyPathHash}${suffix}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getPythonVersion(): Promise<string> {
|
async function getPythonVersion(): Promise<string> {
|
||||||
@@ -76,7 +73,7 @@ async function getPythonVersion(): Promise<string> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const execArgs = ["python", "find", "--directory", workingDirectory];
|
const execArgs = ["python", "find"];
|
||||||
await exec.exec("uv", execArgs, options);
|
await exec.exec("uv", execArgs, options);
|
||||||
const pythonPath = output.trim();
|
const pythonPath = output.trim();
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,11 @@
|
|||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import * as tc from "@actions/tool-cache";
|
import * as tc from "@actions/tool-cache";
|
||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
import * as pep440 from "@renovatebot/pep440";
|
|
||||||
import { promises as fs } from "node:fs";
|
import { promises as fs } from "node:fs";
|
||||||
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
||||||
import type { Architecture, Platform } from "../utils/platforms";
|
import type { Architecture, Platform } from "../utils/platforms";
|
||||||
import { validateChecksum } from "./checksum/checksum";
|
import { validateChecksum } from "./checksum/checksum";
|
||||||
import { Octokit } from "../utils/octokit";
|
import { Octokit } from "../utils/octokit";
|
||||||
import {
|
|
||||||
getDownloadUrl,
|
|
||||||
getLatestKnownVersion as getLatestVersionInManifest,
|
|
||||||
} from "./version-manifest";
|
|
||||||
|
|
||||||
export function tryGetFromToolCache(
|
export function tryGetFromToolCache(
|
||||||
arch: Architecture,
|
arch: Architecture,
|
||||||
@@ -27,85 +22,36 @@ export function tryGetFromToolCache(
|
|||||||
return { version: resolvedVersion, installedPath };
|
return { version: resolvedVersion, installedPath };
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function downloadVersionFromGithub(
|
export async function downloadVersion(
|
||||||
serverUrl: string,
|
|
||||||
platform: Platform,
|
platform: Platform,
|
||||||
arch: Architecture,
|
arch: Architecture,
|
||||||
version: string,
|
version: string,
|
||||||
checkSum: string | undefined,
|
checkSum: string | undefined,
|
||||||
githubToken: string,
|
githubToken: string,
|
||||||
): Promise<{ version: string; cachedToolDir: string }> {
|
): Promise<{ version: string; cachedToolDir: string }> {
|
||||||
|
const resolvedVersion = await resolveVersion(version, githubToken);
|
||||||
const artifact = `uv-${arch}-${platform}`;
|
const artifact = `uv-${arch}-${platform}`;
|
||||||
const extension = getExtension(platform);
|
let extension = ".tar.gz";
|
||||||
const downloadUrl = `${serverUrl}/${OWNER}/${REPO}/releases/download/${version}/${artifact}${extension}`;
|
if (platform === "pc-windows-msvc") {
|
||||||
return await downloadVersion(
|
extension = ".zip";
|
||||||
downloadUrl,
|
|
||||||
artifact,
|
|
||||||
platform,
|
|
||||||
arch,
|
|
||||||
version,
|
|
||||||
checkSum,
|
|
||||||
githubToken,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function downloadVersionFromManifest(
|
|
||||||
manifestUrl: string | undefined,
|
|
||||||
platform: Platform,
|
|
||||||
arch: Architecture,
|
|
||||||
version: string,
|
|
||||||
checkSum: string | undefined,
|
|
||||||
githubToken: string,
|
|
||||||
): Promise<{ version: string; cachedToolDir: string }> {
|
|
||||||
const downloadUrl = await getDownloadUrl(
|
|
||||||
manifestUrl,
|
|
||||||
version,
|
|
||||||
arch,
|
|
||||||
platform,
|
|
||||||
);
|
|
||||||
if (!downloadUrl) {
|
|
||||||
core.info(
|
|
||||||
`manifest-file does not contain version ${version}, arch ${arch}, platform ${platform}. Falling back to GitHub releases.`,
|
|
||||||
);
|
|
||||||
return await downloadVersionFromGithub(
|
|
||||||
"https://github.com",
|
|
||||||
platform,
|
|
||||||
arch,
|
|
||||||
version,
|
|
||||||
checkSum,
|
|
||||||
githubToken,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return await downloadVersion(
|
const downloadUrl = `https://github.com/${OWNER}/${REPO}/releases/download/${resolvedVersion}/${artifact}${extension}`;
|
||||||
downloadUrl,
|
|
||||||
`uv-${arch}-${platform}`,
|
|
||||||
platform,
|
|
||||||
arch,
|
|
||||||
version,
|
|
||||||
checkSum,
|
|
||||||
githubToken,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function downloadVersion(
|
|
||||||
downloadUrl: string,
|
|
||||||
artifactName: string,
|
|
||||||
platform: Platform,
|
|
||||||
arch: Architecture,
|
|
||||||
version: string,
|
|
||||||
checkSum: string | undefined,
|
|
||||||
githubToken: string,
|
|
||||||
): Promise<{ version: string; cachedToolDir: string }> {
|
|
||||||
core.info(`Downloading uv from "${downloadUrl}" ...`);
|
core.info(`Downloading uv from "${downloadUrl}" ...`);
|
||||||
|
|
||||||
const downloadPath = await tc.downloadTool(
|
const downloadPath = await tc.downloadTool(
|
||||||
downloadUrl,
|
downloadUrl,
|
||||||
undefined,
|
undefined,
|
||||||
githubToken,
|
githubToken,
|
||||||
);
|
);
|
||||||
await validateChecksum(checkSum, downloadPath, arch, platform, version);
|
await validateChecksum(
|
||||||
|
checkSum,
|
||||||
|
downloadPath,
|
||||||
|
arch,
|
||||||
|
platform,
|
||||||
|
resolvedVersion,
|
||||||
|
);
|
||||||
|
|
||||||
let uvDir: string;
|
let uvDir: string;
|
||||||
const extension = getExtension(platform);
|
|
||||||
if (platform === "pc-windows-msvc") {
|
if (platform === "pc-windows-msvc") {
|
||||||
const fullPathWithExtension = `${downloadPath}${extension}`;
|
const fullPathWithExtension = `${downloadPath}${extension}`;
|
||||||
await fs.copyFile(downloadPath, fullPathWithExtension);
|
await fs.copyFile(downloadPath, fullPathWithExtension);
|
||||||
@@ -113,47 +59,34 @@ async function downloadVersion(
|
|||||||
// On windows extracting the zip does not create an intermediate directory
|
// On windows extracting the zip does not create an intermediate directory
|
||||||
} else {
|
} else {
|
||||||
const extractedDir = await tc.extractTar(downloadPath);
|
const extractedDir = await tc.extractTar(downloadPath);
|
||||||
uvDir = path.join(extractedDir, artifactName);
|
uvDir = path.join(extractedDir, artifact);
|
||||||
}
|
}
|
||||||
const cachedToolDir = await tc.cacheDir(
|
const cachedToolDir = await tc.cacheDir(
|
||||||
uvDir,
|
uvDir,
|
||||||
TOOL_CACHE_NAME,
|
TOOL_CACHE_NAME,
|
||||||
version,
|
resolvedVersion,
|
||||||
arch,
|
arch,
|
||||||
);
|
);
|
||||||
return { version: version, cachedToolDir };
|
return { version: resolvedVersion, cachedToolDir };
|
||||||
}
|
|
||||||
|
|
||||||
function getExtension(platform: Platform): string {
|
|
||||||
return platform === "pc-windows-msvc" ? ".zip" : ".tar.gz";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function resolveVersion(
|
export async function resolveVersion(
|
||||||
versionInput: string,
|
versionInput: string,
|
||||||
manifestFile: string | undefined,
|
|
||||||
githubToken: string,
|
githubToken: string,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
core.debug(`Resolving version: ${versionInput}`);
|
core.debug(`Resolving version: ${versionInput}`);
|
||||||
let version: string;
|
const version =
|
||||||
if (manifestFile) {
|
versionInput === "latest"
|
||||||
version =
|
? await getLatestVersion(githubToken)
|
||||||
versionInput === "latest"
|
: versionInput;
|
||||||
? await getLatestVersionInManifest(manifestFile)
|
|
||||||
: versionInput;
|
|
||||||
} else {
|
|
||||||
version =
|
|
||||||
versionInput === "latest"
|
|
||||||
? await getLatestVersion(githubToken)
|
|
||||||
: versionInput;
|
|
||||||
}
|
|
||||||
if (tc.isExplicitVersion(version)) {
|
if (tc.isExplicitVersion(version)) {
|
||||||
core.debug(`Version ${version} is an explicit version.`);
|
core.debug(`Version ${version} is an explicit version.`);
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
const availableVersions = await getAvailableVersions(githubToken);
|
const availableVersions = await getAvailableVersions(githubToken);
|
||||||
core.debug(`Available versions: ${availableVersions}`);
|
core.debug(`Available versions: ${availableVersions}`);
|
||||||
const resolvedVersion = maxSatisfying(availableVersions, version);
|
const resolvedVersion = tc.evaluateVersions(availableVersions, version);
|
||||||
if (resolvedVersion === undefined) {
|
if (resolvedVersion === "") {
|
||||||
throw new Error(`No version found for ${version}`);
|
throw new Error(`No version found for ${version}`);
|
||||||
}
|
}
|
||||||
return resolvedVersion;
|
return resolvedVersion;
|
||||||
@@ -221,22 +154,3 @@ async function getLatestRelease(octokit: InstanceType<typeof Octokit>) {
|
|||||||
});
|
});
|
||||||
return latestRelease;
|
return latestRelease;
|
||||||
}
|
}
|
||||||
|
|
||||||
function maxSatisfying(
|
|
||||||
versions: string[],
|
|
||||||
version: string,
|
|
||||||
): string | undefined {
|
|
||||||
const maxSemver = tc.evaluateVersions(versions, version);
|
|
||||||
if (maxSemver !== "") {
|
|
||||||
core.debug(`Found a version that satisfies the semver range: ${maxSemver}`);
|
|
||||||
return maxSemver;
|
|
||||||
}
|
|
||||||
const maxPep440 = pep440.maxSatisfying(versions, version);
|
|
||||||
if (maxPep440 !== null) {
|
|
||||||
core.debug(
|
|
||||||
`Found a version that satisfies the pep440 specifier: ${maxPep440}`,
|
|
||||||
);
|
|
||||||
return maxPep440;
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,91 +0,0 @@
|
|||||||
import { promises as fs } from "node:fs";
|
|
||||||
import * as core from "@actions/core";
|
|
||||||
import * as semver from "semver";
|
|
||||||
import { fetch } from "../utils/fetch";
|
|
||||||
import { join } from "node:path";
|
|
||||||
|
|
||||||
const localManifestFile = join(__dirname, "..", "..", "version-manifest.json");
|
|
||||||
|
|
||||||
interface ManifestEntry {
|
|
||||||
version: string;
|
|
||||||
artifactName: string;
|
|
||||||
arch: string;
|
|
||||||
platform: string;
|
|
||||||
downloadUrl: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function getLatestKnownVersion(
|
|
||||||
manifestUrl: string | undefined,
|
|
||||||
): Promise<string> {
|
|
||||||
const manifestEntries = await getManifestEntries(manifestUrl);
|
|
||||||
return manifestEntries.reduce((a, b) =>
|
|
||||||
semver.gt(a.version, b.version) ? a : b,
|
|
||||||
).version;
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function getDownloadUrl(
|
|
||||||
manifestUrl: string | undefined,
|
|
||||||
version: string,
|
|
||||||
arch: string,
|
|
||||||
platform: string,
|
|
||||||
): Promise<string | undefined> {
|
|
||||||
const manifestEntries = await getManifestEntries(manifestUrl);
|
|
||||||
const entry = manifestEntries.find(
|
|
||||||
(entry) =>
|
|
||||||
entry.version === version &&
|
|
||||||
entry.arch === arch &&
|
|
||||||
entry.platform === platform,
|
|
||||||
);
|
|
||||||
return entry ? entry.downloadUrl : undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getManifestEntries(
|
|
||||||
manifestUrl: string | undefined,
|
|
||||||
): Promise<ManifestEntry[]> {
|
|
||||||
let data: string;
|
|
||||||
if (manifestUrl !== undefined) {
|
|
||||||
core.info(`Fetching manifest-file from: ${manifestUrl}`);
|
|
||||||
const response = await fetch(manifestUrl, {});
|
|
||||||
if (!response.ok) {
|
|
||||||
throw new Error(
|
|
||||||
`Failed to fetch manifest-file: ${response.status} ${response.statusText}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
data = await response.text();
|
|
||||||
} else {
|
|
||||||
core.info("manifest-file not provided, reading from local file.");
|
|
||||||
const fileContent = await fs.readFile(localManifestFile);
|
|
||||||
data = fileContent.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
return JSON.parse(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function updateVersionManifest(
|
|
||||||
manifestUrl: string,
|
|
||||||
downloadUrls: string[],
|
|
||||||
): Promise<void> {
|
|
||||||
const manifest: ManifestEntry[] = [];
|
|
||||||
|
|
||||||
for (const downloadUrl of downloadUrls) {
|
|
||||||
const urlParts = downloadUrl.split("/");
|
|
||||||
const version = urlParts[urlParts.length - 2];
|
|
||||||
const artifactName = urlParts[urlParts.length - 1];
|
|
||||||
if (!artifactName.startsWith("uv-")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (artifactName.startsWith("uv-installer")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const artifactParts = artifactName.split(".")[0].split("-");
|
|
||||||
manifest.push({
|
|
||||||
version: version,
|
|
||||||
artifactName: artifactName,
|
|
||||||
arch: artifactParts[1],
|
|
||||||
platform: artifactName.split(`uv-${artifactParts[1]}-`)[1].split(".")[0],
|
|
||||||
downloadUrl: downloadUrl,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
core.debug(`Updating manifest-file: ${JSON.stringify(manifest)}`);
|
|
||||||
await fs.writeFile(manifestUrl, JSON.stringify(manifest));
|
|
||||||
}
|
|
||||||
115
src/setup-uv.ts
115
src/setup-uv.ts
@@ -1,10 +1,9 @@
|
|||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
import {
|
import {
|
||||||
|
downloadVersion,
|
||||||
tryGetFromToolCache,
|
tryGetFromToolCache,
|
||||||
resolveVersion,
|
resolveVersion,
|
||||||
downloadVersionFromGithub,
|
|
||||||
downloadVersionFromManifest,
|
|
||||||
} from "./download/download-version";
|
} from "./download/download-version";
|
||||||
import { restoreCache } from "./cache/restore-cache";
|
import { restoreCache } from "./cache/restore-cache";
|
||||||
|
|
||||||
@@ -15,24 +14,21 @@ import {
|
|||||||
type Platform,
|
type Platform,
|
||||||
} from "./utils/platforms";
|
} from "./utils/platforms";
|
||||||
import {
|
import {
|
||||||
activateEnvironment as activateEnvironmentInput,
|
|
||||||
cacheLocalPath,
|
cacheLocalPath,
|
||||||
checkSum,
|
checkSum,
|
||||||
ignoreEmptyWorkdir,
|
ignoreEmptyWorkdir,
|
||||||
enableCache,
|
enableCache,
|
||||||
githubToken,
|
githubToken,
|
||||||
|
pyProjectFile,
|
||||||
pythonVersion,
|
pythonVersion,
|
||||||
toolBinDir,
|
toolBinDir,
|
||||||
toolDir,
|
toolDir,
|
||||||
|
uvFile,
|
||||||
version as versionInput,
|
version as versionInput,
|
||||||
versionFile as versionFileInput,
|
|
||||||
workingDirectory,
|
|
||||||
serverUrl,
|
|
||||||
manifestFile,
|
|
||||||
} from "./utils/inputs";
|
} from "./utils/inputs";
|
||||||
import * as exec from "@actions/exec";
|
import * as exec from "@actions/exec";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import { getUvVersionFromFile } from "./version/resolve";
|
import { getUvVersionFromConfigFile } from "./utils/pyproject";
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
detectEmptyWorkdir();
|
detectEmptyWorkdir();
|
||||||
@@ -48,11 +44,10 @@ async function run(): Promise<void> {
|
|||||||
}
|
}
|
||||||
const setupResult = await setupUv(platform, arch, checkSum, githubToken);
|
const setupResult = await setupUv(platform, arch, checkSum, githubToken);
|
||||||
|
|
||||||
|
addUvToPath(setupResult.uvDir);
|
||||||
addToolBinToPath();
|
addToolBinToPath();
|
||||||
addUvToPathAndOutput(setupResult.uvDir);
|
|
||||||
setToolDir();
|
setToolDir();
|
||||||
setupPython();
|
await setupPython();
|
||||||
await activateEnvironment();
|
|
||||||
addMatchers();
|
addMatchers();
|
||||||
setCacheDir(cacheLocalPath);
|
setCacheDir(cacheLocalPath);
|
||||||
|
|
||||||
@@ -88,7 +83,7 @@ async function setupUv(
|
|||||||
checkSum: string | undefined,
|
checkSum: string | undefined,
|
||||||
githubToken: string,
|
githubToken: string,
|
||||||
): Promise<{ uvDir: string; version: string }> {
|
): Promise<{ uvDir: string; version: string }> {
|
||||||
const resolvedVersion = await determineVersion(manifestFile);
|
const resolvedVersion = await determineVersion();
|
||||||
const toolCacheResult = tryGetFromToolCache(arch, resolvedVersion);
|
const toolCacheResult = tryGetFromToolCache(arch, resolvedVersion);
|
||||||
if (toolCacheResult.installedPath) {
|
if (toolCacheResult.installedPath) {
|
||||||
core.info(`Found uv in tool-cache for ${toolCacheResult.version}`);
|
core.info(`Found uv in tool-cache for ${toolCacheResult.version}`);
|
||||||
@@ -98,29 +93,13 @@ async function setupUv(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
let downloadVersionResult: { version: string; cachedToolDir: string };
|
const downloadVersionResult = await downloadVersion(
|
||||||
if (serverUrl !== "https://github.com") {
|
platform,
|
||||||
core.warning(
|
arch,
|
||||||
"The input server-url is deprecated. Please use manifest-file instead.",
|
resolvedVersion,
|
||||||
);
|
checkSum,
|
||||||
downloadVersionResult = await downloadVersionFromGithub(
|
githubToken,
|
||||||
serverUrl,
|
);
|
||||||
platform,
|
|
||||||
arch,
|
|
||||||
resolvedVersion,
|
|
||||||
checkSum,
|
|
||||||
githubToken,
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
downloadVersionResult = await downloadVersionFromManifest(
|
|
||||||
manifestFile,
|
|
||||||
platform,
|
|
||||||
arch,
|
|
||||||
resolvedVersion,
|
|
||||||
checkSum,
|
|
||||||
githubToken,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
uvDir: downloadVersionResult.cachedToolDir,
|
uvDir: downloadVersionResult.cachedToolDir,
|
||||||
@@ -128,42 +107,29 @@ async function setupUv(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async function determineVersion(
|
async function determineVersion(): Promise<string> {
|
||||||
manifestFile: string | undefined,
|
|
||||||
): Promise<string> {
|
|
||||||
if (versionInput !== "") {
|
if (versionInput !== "") {
|
||||||
return await resolveVersion(versionInput, manifestFile, githubToken);
|
return await resolveVersion(versionInput, githubToken);
|
||||||
}
|
}
|
||||||
if (versionFileInput !== "") {
|
const configFile = uvFile !== "" ? uvFile : pyProjectFile;
|
||||||
const versionFromFile = getUvVersionFromFile(versionFileInput);
|
if (configFile !== "") {
|
||||||
if (versionFromFile === undefined) {
|
const versionFromConfigFile = getUvVersionFromConfigFile(configFile);
|
||||||
throw new Error(
|
if (versionFromConfigFile === undefined) {
|
||||||
`Could not determine uv version from file: ${versionFileInput}`,
|
core.warning(
|
||||||
|
`Could not find required-version under [tool.uv] in ${configFile}. Falling back to latest`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return await resolveVersion(versionFromFile, manifestFile, githubToken);
|
return await resolveVersion(versionFromConfigFile || "latest", githubToken);
|
||||||
}
|
}
|
||||||
const versionFromUvToml = getUvVersionFromFile(
|
if (!fs.existsSync("uv.toml") && !fs.existsSync("pyproject.toml")) {
|
||||||
`${workingDirectory}${path.sep}uv.toml`,
|
return await resolveVersion("latest", githubToken);
|
||||||
);
|
|
||||||
const versionFromPyproject = getUvVersionFromFile(
|
|
||||||
`${workingDirectory}${path.sep}pyproject.toml`,
|
|
||||||
);
|
|
||||||
if (versionFromUvToml === undefined && versionFromPyproject === undefined) {
|
|
||||||
core.info(
|
|
||||||
"Could not determine uv version from uv.toml or pyproject.toml. Falling back to latest.",
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return await resolveVersion(
|
const versionFile = fs.existsSync("uv.toml") ? "uv.toml" : "pyproject.toml";
|
||||||
versionFromUvToml || versionFromPyproject || "latest",
|
const versionFromConfigFile = getUvVersionFromConfigFile(versionFile);
|
||||||
manifestFile,
|
return await resolveVersion(versionFromConfigFile || "latest", githubToken);
|
||||||
githubToken,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function addUvToPathAndOutput(cachedPath: string): void {
|
function addUvToPath(cachedPath: string): void {
|
||||||
core.setOutput("uv-path", `${cachedPath}${path.sep}uv`);
|
|
||||||
core.setOutput("uvx-path", `${cachedPath}${path.sep}uvx`);
|
|
||||||
core.addPath(cachedPath);
|
core.addPath(cachedPath);
|
||||||
core.info(`Added ${cachedPath} to the path`);
|
core.info(`Added ${cachedPath} to the path`);
|
||||||
}
|
}
|
||||||
@@ -195,29 +161,24 @@ function setToolDir(): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupPython(): void {
|
async function setupPython(): Promise<void> {
|
||||||
if (pythonVersion !== "") {
|
if (pythonVersion !== "") {
|
||||||
core.exportVariable("UV_PYTHON", pythonVersion);
|
core.exportVariable("UV_PYTHON", pythonVersion);
|
||||||
core.info(`Set UV_PYTHON to ${pythonVersion}`);
|
core.info(`Set UV_PYTHON to ${pythonVersion}`);
|
||||||
}
|
const options: exec.ExecOptions = {
|
||||||
}
|
silent: !core.isDebug(),
|
||||||
|
};
|
||||||
async function activateEnvironment(): Promise<void> {
|
const execArgs = ["venv", "--python", pythonVersion];
|
||||||
if (activateEnvironmentInput) {
|
|
||||||
const execArgs = ["venv", ".venv", "--directory", workingDirectory];
|
|
||||||
|
|
||||||
core.info("Activating python venv...");
|
core.info("Activating python venv...");
|
||||||
await exec.exec("uv", execArgs);
|
await exec.exec("uv", execArgs, options);
|
||||||
|
|
||||||
let venvBinPath = `${workingDirectory}${path.sep}.venv${path.sep}bin`;
|
let venvBinPath = ".venv/bin";
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
venvBinPath = `${workingDirectory}${path.sep}.venv${path.sep}Scripts`;
|
venvBinPath = ".venv/Scripts";
|
||||||
}
|
}
|
||||||
core.addPath(path.resolve(venvBinPath));
|
core.addPath(path.resolve(venvBinPath));
|
||||||
core.exportVariable(
|
core.exportVariable("VIRTUAL_ENV", path.resolve(".venv"));
|
||||||
"VIRTUAL_ENV",
|
|
||||||
path.resolve(`${workingDirectory}${path.sep}.venv`),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
34
src/update-known-checksums.ts
Normal file
34
src/update-known-checksums.ts
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import * as semver from "semver";
|
||||||
|
import * as core from "@actions/core";
|
||||||
|
import { Octokit } from "./utils/octokit";
|
||||||
|
|
||||||
|
import { OWNER, REPO } from "./utils/constants";
|
||||||
|
|
||||||
|
import { updateChecksums } from "./download/checksum/update-known-checksums";
|
||||||
|
|
||||||
|
async function run(): Promise<void> {
|
||||||
|
const checksumFilePath = process.argv.slice(2)[0];
|
||||||
|
const github_token = process.argv.slice(2)[1];
|
||||||
|
|
||||||
|
const octokit = new Octokit({
|
||||||
|
auth: github_token,
|
||||||
|
});
|
||||||
|
|
||||||
|
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
|
||||||
|
owner: OWNER,
|
||||||
|
repo: REPO,
|
||||||
|
});
|
||||||
|
const downloadUrls: string[] = response.flatMap((release) =>
|
||||||
|
release.assets
|
||||||
|
.filter((asset) => asset.name.endsWith(".sha256"))
|
||||||
|
.map((asset) => asset.browser_download_url),
|
||||||
|
);
|
||||||
|
await updateChecksums(checksumFilePath, downloadUrls);
|
||||||
|
|
||||||
|
const latestVersion = response
|
||||||
|
.map((release) => release.tag_name)
|
||||||
|
.sort(semver.rcompare)[0];
|
||||||
|
core.setOutput("latest-version", latestVersion);
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
import * as semver from "semver";
|
|
||||||
import * as core from "@actions/core";
|
|
||||||
import { Octokit } from "./utils/octokit";
|
|
||||||
|
|
||||||
import { OWNER, REPO } from "./utils/constants";
|
|
||||||
|
|
||||||
import { updateChecksums } from "./download/checksum/update-known-checksums";
|
|
||||||
import {
|
|
||||||
updateVersionManifest,
|
|
||||||
getLatestKnownVersion,
|
|
||||||
} from "./download/version-manifest";
|
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
|
||||||
const checksumFilePath = process.argv.slice(2)[0];
|
|
||||||
const versionsManifestFile = process.argv.slice(2)[1];
|
|
||||||
const githubToken = process.argv.slice(2)[2];
|
|
||||||
|
|
||||||
const octokit = new Octokit({
|
|
||||||
auth: githubToken,
|
|
||||||
});
|
|
||||||
|
|
||||||
const { data: latestRelease } = await octokit.rest.repos.getLatestRelease({
|
|
||||||
owner: OWNER,
|
|
||||||
repo: REPO,
|
|
||||||
});
|
|
||||||
|
|
||||||
const latestKnownVersion = await getLatestKnownVersion(undefined);
|
|
||||||
|
|
||||||
if (semver.lte(latestRelease.tag_name, latestKnownVersion)) {
|
|
||||||
core.info(
|
|
||||||
`Latest release (${latestRelease.tag_name}) is not newer than the latest known version (${latestKnownVersion}). Skipping update.`,
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const releases = await octokit.paginate(octokit.rest.repos.listReleases, {
|
|
||||||
owner: OWNER,
|
|
||||||
repo: REPO,
|
|
||||||
});
|
|
||||||
const checksumDownloadUrls: string[] = releases.flatMap((release) =>
|
|
||||||
release.assets
|
|
||||||
.filter((asset) => asset.name.endsWith(".sha256"))
|
|
||||||
.map((asset) => asset.browser_download_url),
|
|
||||||
);
|
|
||||||
await updateChecksums(checksumFilePath, checksumDownloadUrls);
|
|
||||||
|
|
||||||
const artifactDownloadUrls: string[] = releases.flatMap((release) =>
|
|
||||||
release.assets
|
|
||||||
.filter((asset) => !asset.name.endsWith(".sha256"))
|
|
||||||
.map((asset) => asset.browser_download_url),
|
|
||||||
);
|
|
||||||
|
|
||||||
await updateVersionManifest(versionsManifestFile, artifactDownloadUrls);
|
|
||||||
|
|
||||||
core.setOutput("latest-version", latestRelease.tag_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
run();
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
import { fetch as undiciFetch, ProxyAgent, type RequestInit } from "undici";
|
|
||||||
|
|
||||||
export function getProxyAgent() {
|
|
||||||
const httpProxy = process.env.HTTP_PROXY || process.env.http_proxy;
|
|
||||||
if (httpProxy) {
|
|
||||||
return new ProxyAgent(httpProxy);
|
|
||||||
}
|
|
||||||
|
|
||||||
const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy;
|
|
||||||
if (httpsProxy) {
|
|
||||||
return new ProxyAgent(httpsProxy);
|
|
||||||
}
|
|
||||||
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const fetch = async (url: string, opts: RequestInit) =>
|
|
||||||
await undiciFetch(url, {
|
|
||||||
dispatcher: getProxyAgent(),
|
|
||||||
...opts,
|
|
||||||
});
|
|
||||||
@@ -1,12 +1,10 @@
|
|||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { getManifestFromRepo } from "@actions/tool-cache";
|
|
||||||
|
|
||||||
export const version = core.getInput("version");
|
export const version = core.getInput("version");
|
||||||
export const versionFile = core.getInput("version-file");
|
export const pyProjectFile = core.getInput("pyproject-file");
|
||||||
|
export const uvFile = core.getInput("uv-file");
|
||||||
export const pythonVersion = core.getInput("python-version");
|
export const pythonVersion = core.getInput("python-version");
|
||||||
export const activateEnvironment = core.getBooleanInput("activate-environment");
|
|
||||||
export const workingDirectory = core.getInput("working-directory");
|
|
||||||
export const checkSum = core.getInput("checksum");
|
export const checkSum = core.getInput("checksum");
|
||||||
export const enableCache = getEnableCache();
|
export const enableCache = getEnableCache();
|
||||||
export const cacheSuffix = core.getInput("cache-suffix") || "";
|
export const cacheSuffix = core.getInput("cache-suffix") || "";
|
||||||
@@ -19,9 +17,7 @@ export const ignoreEmptyWorkdir =
|
|||||||
core.getInput("ignore-empty-workdir") === "true";
|
core.getInput("ignore-empty-workdir") === "true";
|
||||||
export const toolBinDir = getToolBinDir();
|
export const toolBinDir = getToolBinDir();
|
||||||
export const toolDir = getToolDir();
|
export const toolDir = getToolDir();
|
||||||
export const serverUrl = core.getInput("server-url");
|
|
||||||
export const githubToken = core.getInput("github-token");
|
export const githubToken = core.getInput("github-token");
|
||||||
export const manifestFile = getManifestFile();
|
|
||||||
|
|
||||||
function getEnableCache(): boolean {
|
function getEnableCache(): boolean {
|
||||||
const enableCacheInput = core.getInput("enable-cache");
|
const enableCacheInput = core.getInput("enable-cache");
|
||||||
@@ -68,18 +64,12 @@ function getCacheLocalPath(): string {
|
|||||||
if (cacheLocalPathInput !== "") {
|
if (cacheLocalPathInput !== "") {
|
||||||
return expandTilde(cacheLocalPathInput);
|
return expandTilde(cacheLocalPathInput);
|
||||||
}
|
}
|
||||||
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
|
if (process.env.RUNNER_TEMP !== undefined) {
|
||||||
if (process.env.RUNNER_TEMP !== undefined) {
|
return `${process.env.RUNNER_TEMP}${path.sep}setup-uv-cache`;
|
||||||
return `${process.env.RUNNER_TEMP}${path.sep}setup-uv-cache`;
|
|
||||||
}
|
|
||||||
throw Error(
|
|
||||||
"Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input",
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if (process.platform === "win32") {
|
throw Error(
|
||||||
return `${process.env.APPDATA}${path.sep}uv${path.sep}cache`;
|
"Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input",
|
||||||
}
|
);
|
||||||
return `${process.env.HOME}${path.sep}.cache${path.sep}uv`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function expandTilde(input: string): string {
|
function expandTilde(input: string): string {
|
||||||
@@ -88,11 +78,3 @@ function expandTilde(input: string): string {
|
|||||||
}
|
}
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getManifestFile(): string | undefined {
|
|
||||||
const manifestFileInput = core.getInput("manifest-file");
|
|
||||||
if (manifestFileInput !== "") {
|
|
||||||
return manifestFileInput;
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
type PaginateInterface,
|
type PaginateInterface,
|
||||||
} from "@octokit/plugin-paginate-rest";
|
} from "@octokit/plugin-paginate-rest";
|
||||||
import { legacyRestEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
import { legacyRestEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
||||||
import { fetch as customFetch } from "./fetch";
|
import { fetch as undiciFetch, ProxyAgent, type RequestInit } from "undici";
|
||||||
|
|
||||||
export type { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods";
|
export type { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods";
|
||||||
|
|
||||||
@@ -17,6 +17,26 @@ const DEFAULTS = {
|
|||||||
userAgent: "setup-uv",
|
userAgent: "setup-uv",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export function getProxyAgent() {
|
||||||
|
const httpProxy = process.env.HTTP_PROXY || process.env.http_prox;
|
||||||
|
if (httpProxy) {
|
||||||
|
return new ProxyAgent(httpProxy);
|
||||||
|
}
|
||||||
|
|
||||||
|
const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy;
|
||||||
|
if (httpsProxy) {
|
||||||
|
return new ProxyAgent(httpsProxy);
|
||||||
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const customFetch = async (url: string, opts: RequestInit) =>
|
||||||
|
await undiciFetch(url, {
|
||||||
|
dispatcher: getProxyAgent(),
|
||||||
|
...opts,
|
||||||
|
});
|
||||||
|
|
||||||
export const Octokit: typeof Core &
|
export const Octokit: typeof Core &
|
||||||
Constructor<
|
Constructor<
|
||||||
{
|
{
|
||||||
|
|||||||
46
src/utils/pyproject.ts
Normal file
46
src/utils/pyproject.ts
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import fs from "node:fs";
|
||||||
|
import * as core from "@actions/core";
|
||||||
|
import * as toml from "smol-toml";
|
||||||
|
|
||||||
|
export function getUvVersionFromConfigFile(
|
||||||
|
filePath: string,
|
||||||
|
): string | undefined {
|
||||||
|
core.debug(`Trying to find required-version for uv in: ${filePath}`);
|
||||||
|
if (!fs.existsSync(filePath)) {
|
||||||
|
core.warning(`Could not find file: ${filePath}`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
let requiredVersion: string | undefined;
|
||||||
|
try {
|
||||||
|
requiredVersion = getRequiredVersion(filePath);
|
||||||
|
} catch (err) {
|
||||||
|
const message = (err as Error).message;
|
||||||
|
core.warning(`Error while parsing ${filePath}: ${message}`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requiredVersion?.startsWith("==")) {
|
||||||
|
requiredVersion = requiredVersion.slice(2);
|
||||||
|
}
|
||||||
|
if (requiredVersion !== undefined) {
|
||||||
|
core.info(
|
||||||
|
`Found required-version for uv in ${filePath}: ${requiredVersion}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return requiredVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRequiredVersion(filePath: string): string | undefined {
|
||||||
|
const fileContent = fs.readFileSync(filePath, "utf-8");
|
||||||
|
|
||||||
|
if (filePath.endsWith("pyproject.toml")) {
|
||||||
|
const tomlContent = toml.parse(fileContent) as {
|
||||||
|
tool?: { uv?: { "required-version"?: string } };
|
||||||
|
};
|
||||||
|
return tomlContent?.tool?.uv?.["required-version"];
|
||||||
|
}
|
||||||
|
const tomlContent = toml.parse(fileContent) as {
|
||||||
|
"required-version"?: string;
|
||||||
|
};
|
||||||
|
return tomlContent["required-version"];
|
||||||
|
}
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import fs from "node:fs";
|
|
||||||
import * as toml from "smol-toml";
|
|
||||||
|
|
||||||
export function getRequiredVersionFromConfigFile(
|
|
||||||
filePath: string,
|
|
||||||
): string | undefined {
|
|
||||||
if (!filePath.endsWith(".toml")) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
const fileContent = fs.readFileSync(filePath, "utf-8");
|
|
||||||
|
|
||||||
if (filePath.endsWith("pyproject.toml")) {
|
|
||||||
const tomlContent = toml.parse(fileContent) as {
|
|
||||||
tool?: { uv?: { "required-version"?: string } };
|
|
||||||
};
|
|
||||||
return tomlContent?.tool?.uv?.["required-version"];
|
|
||||||
}
|
|
||||||
const tomlContent = toml.parse(fileContent) as {
|
|
||||||
"required-version"?: string;
|
|
||||||
};
|
|
||||||
return tomlContent["required-version"];
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
import * as toml from "smol-toml";
|
|
||||||
import fs from "node:fs";
|
|
||||||
|
|
||||||
export function getUvVersionFromRequirementsFile(
|
|
||||||
filePath: string,
|
|
||||||
): string | undefined {
|
|
||||||
const fileContent = fs.readFileSync(filePath, "utf-8");
|
|
||||||
if (filePath.endsWith(".txt")) {
|
|
||||||
return getUvVersionFromAllDependencies(fileContent.split("\n"));
|
|
||||||
}
|
|
||||||
const dependencies = parsePyprojectDependencies(fileContent);
|
|
||||||
return getUvVersionFromAllDependencies(dependencies);
|
|
||||||
}
|
|
||||||
function getUvVersionFromAllDependencies(
|
|
||||||
allDependencies: string[],
|
|
||||||
): string | undefined {
|
|
||||||
return allDependencies
|
|
||||||
.find((dep: string) => dep.startsWith("uv"))
|
|
||||||
?.match(/^uv([^A-Z0-9._-]+.*)$/)?.[1]
|
|
||||||
.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Pyproject {
|
|
||||||
project?: {
|
|
||||||
dependencies?: string[];
|
|
||||||
"optional-dependencies"?: Record<string, string[]>;
|
|
||||||
};
|
|
||||||
"dependency-groups"?: Record<string, Array<string | object>>;
|
|
||||||
}
|
|
||||||
|
|
||||||
function parsePyprojectDependencies(pyprojectContent: string): string[] {
|
|
||||||
const pyproject: Pyproject = toml.parse(pyprojectContent);
|
|
||||||
const dependencies: string[] = pyproject?.project?.dependencies || [];
|
|
||||||
const optionalDependencies: string[] = Object.values(
|
|
||||||
pyproject?.project?.["optional-dependencies"] || {},
|
|
||||||
).flat();
|
|
||||||
const devDependencies: string[] = Object.values(
|
|
||||||
pyproject?.["dependency-groups"] || {},
|
|
||||||
)
|
|
||||||
.flat()
|
|
||||||
.filter((item: string | object) => typeof item === "string");
|
|
||||||
return dependencies.concat(optionalDependencies, devDependencies);
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
import * as core from "@actions/core";
|
|
||||||
import fs from "node:fs";
|
|
||||||
import { getRequiredVersionFromConfigFile } from "./config-file";
|
|
||||||
import { getUvVersionFromRequirementsFile } from "./requirements-file";
|
|
||||||
|
|
||||||
export function getUvVersionFromFile(filePath: string): string | undefined {
|
|
||||||
core.info(`Trying to find version for uv in: ${filePath}`);
|
|
||||||
if (!fs.existsSync(filePath)) {
|
|
||||||
core.info(`Could not find file: ${filePath}`);
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
let uvVersion: string | undefined;
|
|
||||||
try {
|
|
||||||
uvVersion = getRequiredVersionFromConfigFile(filePath);
|
|
||||||
if (uvVersion === undefined) {
|
|
||||||
uvVersion = getUvVersionFromRequirementsFile(filePath);
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
const message = (err as Error).message;
|
|
||||||
core.warning(`Error while parsing ${filePath}: ${message}`);
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (uvVersion?.startsWith("==")) {
|
|
||||||
uvVersion = uvVersion.slice(2);
|
|
||||||
}
|
|
||||||
if (uvVersion !== undefined) {
|
|
||||||
core.info(`Found version for uv in ${filePath}: ${uvVersion}`);
|
|
||||||
}
|
|
||||||
return uvVersion;
|
|
||||||
}
|
|
||||||
22738
version-manifest.json
22738
version-manifest.json
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user