mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-08-25 11:33:53 +00:00
Use self-repo syntax for all in-repo actions/reusable workflows (#1024)
With the self-repo syntax, we also shouldn't need any of these `actions/checkout` calls. Signed-off-by: William Woodruff <william@yossarian.net> --------- Signed-off-by: William Woodruff <william@yossarian.net>
This commit is contained in:
@@ -8,6 +8,10 @@ self-hosted-runner:
|
|||||||
# Empty array means no configuration variable is allowed.
|
# Empty array means no configuration variable is allowed.
|
||||||
config-variables: null
|
config-variables: null
|
||||||
paths:
|
paths:
|
||||||
|
.github/workflows/**/*.{yml,yaml}:
|
||||||
|
ignore:
|
||||||
|
- 'specifying action "\$/" in invalid format because ref is missing'
|
||||||
|
- 'reusable workflow call "\$/.+" at "uses" is not following the format'
|
||||||
.github/workflows/test.yml:
|
.github/workflows/test.yml:
|
||||||
ignore:
|
ignore:
|
||||||
- 'invalid runner name.+'
|
- 'invalid runner name.+'
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ jobs:
|
|||||||
name: Update docs
|
name: Update docs
|
||||||
needs:
|
needs:
|
||||||
- release
|
- release
|
||||||
uses: ./.github/workflows/update-docs.yml
|
uses: $/.github/workflows/update-docs.yml
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|||||||
+43
-101
@@ -56,7 +56,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install latest version
|
- name: Install latest version
|
||||||
id: setup-uv
|
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
|
shell: bash
|
||||||
@@ -81,7 +81,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install with UV_NO_MODIFY_PATH set
|
- name: Install with UV_NO_MODIFY_PATH set
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
env:
|
env:
|
||||||
UV_NO_MODIFY_PATH: 1
|
UV_NO_MODIFY_PATH: 1
|
||||||
- run: |
|
- run: |
|
||||||
@@ -130,7 +130,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install version ${{ matrix.input.version-input }} with strategy ${{ matrix.input.resolution-strategy || 'highest' }}
|
- name: Install version ${{ matrix.input.version-input }} with strategy ${{ matrix.input.resolution-strategy || 'highest' }}
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.input.version-input }}
|
version: ${{ matrix.input.version-input }}
|
||||||
resolution-strategy: ${{ matrix.input.resolution-strategy || 'highest' }}
|
resolution-strategy: ${{ matrix.input.resolution-strategy || 'highest' }}
|
||||||
@@ -154,11 +154,8 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
version-input: ["latest", ">=0.8"]
|
version-input: ["latest", ">=0.8"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install version ${{ matrix.version-input }}
|
- name: Install version ${{ matrix.version-input }}
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.version-input }}
|
version: ${{ matrix.version-input }}
|
||||||
- name: Latest version gets installed
|
- name: Latest version gets installed
|
||||||
@@ -198,7 +195,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install version from ${{ matrix.input.working-directory }}
|
- name: Install version from ${{ matrix.input.working-directory }}
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
working-directory: ${{ matrix.input.working-directory }}
|
working-directory: ${{ matrix.input.working-directory }}
|
||||||
- name: Correct version gets installed
|
- name: Correct version gets installed
|
||||||
@@ -224,7 +221,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install version from ${{ matrix.input.version-file }}
|
- name: Install version from ${{ matrix.input.version-file }}
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
version-file: ${{ matrix.input.version-file }}
|
version-file: ${{ matrix.input.version-file }}
|
||||||
- name: Correct version gets installed
|
- name: Correct version gets installed
|
||||||
@@ -242,7 +239,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install versions from .tool-versions
|
- name: Install versions from .tool-versions
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
version-file: "__tests__/fixtures/.tool-versions"
|
version-file: "__tests__/fixtures/.tool-versions"
|
||||||
- name: Verify Python version from .tool-versions
|
- name: Verify Python version from .tool-versions
|
||||||
@@ -267,7 +264,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install using malformed pyproject.toml
|
- name: Install using malformed pyproject.toml
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
working-directory: "__tests__/fixtures/malformed-pyproject-toml-project"
|
working-directory: "__tests__/fixtures/malformed-pyproject-toml-project"
|
||||||
- run: uv --help
|
- run: uv --help
|
||||||
@@ -286,7 +283,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Checksum matches expected
|
- name: Checksum matches expected
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
version: "0.3.2"
|
version: "0.3.2"
|
||||||
checksum: ${{ matrix.inputs.checksum }}
|
checksum: ${{ matrix.inputs.checksum }}
|
||||||
@@ -300,7 +297,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install default version
|
- name: Install default version
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
@@ -309,11 +306,8 @@ jobs:
|
|||||||
test-uvx:
|
test-uvx:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install default version
|
- name: Install default version
|
||||||
uses: ./
|
uses: $/
|
||||||
- run: uvx ruff@0.14.10 --version
|
- run: uvx ruff@0.14.10 --version
|
||||||
|
|
||||||
test-tool-install:
|
test-tool-install:
|
||||||
@@ -322,11 +316,8 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
|
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install default version
|
- name: Install default version
|
||||||
uses: ./
|
uses: $/
|
||||||
- run: uv tool install ruff==0.14.10
|
- run: uv tool install ruff==0.14.10
|
||||||
- run: ruff --version
|
- run: ruff --version
|
||||||
|
|
||||||
@@ -341,7 +332,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install latest version
|
- name: Install latest version
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
python-version: 3.13.1t
|
python-version: 3.13.1t
|
||||||
- name: Verify UV_PYTHON is set to correct version
|
- name: Verify UV_PYTHON is set to correct version
|
||||||
@@ -368,12 +359,9 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install latest version
|
- name: Install latest version
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
python-version: 3.13.1t
|
python-version: 3.13.1t
|
||||||
activate-environment: true
|
activate-environment: true
|
||||||
@@ -407,12 +395,9 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install latest version
|
- name: Install latest version
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
python-version: 3.13.1t
|
python-version: 3.13.1t
|
||||||
activate-environment: true
|
activate-environment: true
|
||||||
@@ -458,9 +443,6 @@ jobs:
|
|||||||
test-activate-environment-no-project:
|
test-activate-environment-no-project:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Create incompatible pyproject.toml
|
- name: Create incompatible pyproject.toml
|
||||||
run: |
|
run: |
|
||||||
cat > pyproject.toml <<'EOF'
|
cat > pyproject.toml <<'EOF'
|
||||||
@@ -476,7 +458,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
- name: Install latest version with no-project
|
- name: Install latest version with no-project
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
python-version: 3.13.1t
|
python-version: 3.13.1t
|
||||||
activate-environment: true
|
activate-environment: true
|
||||||
@@ -506,7 +488,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install latest version
|
- name: Install latest version
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
@@ -521,7 +503,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install latest version
|
- name: Install latest version
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
- name: Verify cache key contains alpine
|
- name: Verify cache key contains alpine
|
||||||
@@ -555,12 +537,9 @@ jobs:
|
|||||||
- os: windows-2025
|
- os: windows-2025
|
||||||
expected-os: "windows-2025"
|
expected-os: "windows-2025"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Setup uv
|
- name: Setup uv
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
- name: Verify cache key contains OS version
|
- name: Verify cache key contains OS version
|
||||||
@@ -585,7 +564,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Setup with cache
|
- name: Setup with cache
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: ${{ matrix.enable-cache }}
|
enable-cache: ${{ matrix.enable-cache }}
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-${{ matrix.os }}-${{ matrix.enable-cache }}
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-${{ matrix.os }}-${{ matrix.enable-cache }}
|
||||||
@@ -605,7 +584,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Restore with cache
|
- name: Restore with cache
|
||||||
id: restore
|
id: restore
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: ${{ matrix.enable-cache }}
|
enable-cache: ${{ matrix.enable-cache }}
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-${{ matrix.os }}-${{ matrix.enable-cache }}
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-${{ matrix.os }}-${{ matrix.enable-cache }}
|
||||||
@@ -638,7 +617,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Setup with cache
|
- name: Setup with cache
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-requirements-txt
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-requirements-txt
|
||||||
@@ -655,7 +634,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Restore with cache
|
- name: Restore with cache
|
||||||
id: restore
|
id: restore
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-requirements-txt
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-requirements-txt
|
||||||
@@ -678,7 +657,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Setup with cache
|
- name: Setup with cache
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-dependency-glob: |
|
cache-dependency-glob: |
|
||||||
@@ -700,7 +679,7 @@ jobs:
|
|||||||
echo 'dev-dependencies = []' >> __tests__/fixtures/uv-project/pyproject.toml
|
echo 'dev-dependencies = []' >> __tests__/fixtures/uv-project/pyproject.toml
|
||||||
- name: Restore with cache
|
- name: Restore with cache
|
||||||
id: restore
|
id: restore
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-dependency-glob: |
|
cache-dependency-glob: |
|
||||||
@@ -723,7 +702,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Setup with cache
|
- name: Setup with cache
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
save-cache: false
|
save-cache: false
|
||||||
@@ -740,7 +719,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Restore with cache
|
- name: Restore with cache
|
||||||
id: restore
|
id: restore
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-save-cache-false
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-save-cache-false
|
||||||
@@ -759,7 +738,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Setup with cache
|
- name: Setup with cache
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-restore-cache-false
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-restore-cache-false
|
||||||
@@ -775,7 +754,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Restore with cache
|
- name: Restore with cache
|
||||||
id: restore
|
id: restore
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
restore-cache: false
|
restore-cache: false
|
||||||
@@ -798,11 +777,8 @@ jobs:
|
|||||||
expected-cache-dir: "D:\\a\\_temp\\setup-uv-cache"
|
expected-cache-dir: "D:\\a\\_temp\\setup-uv-cache"
|
||||||
runs-on: ${{ matrix.inputs.os }}
|
runs-on: ${{ matrix.inputs.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Setup with cache
|
- name: Setup with cache
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-local
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-local
|
||||||
@@ -816,11 +792,8 @@ jobs:
|
|||||||
test-cache-local-cache-disabled:
|
test-cache-local-cache-disabled:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Setup without cache
|
- name: Setup without cache
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: false
|
enable-cache: false
|
||||||
|
|
||||||
@@ -835,11 +808,8 @@ jobs:
|
|||||||
test-cache-local-cache-disabled-but-explicit-path:
|
test-cache-local-cache-disabled-but-explicit-path:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Setup without cache
|
- name: Setup without cache
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: false
|
enable-cache: false
|
||||||
cache-local-path: /tmp/uv-cache-disabled
|
cache-local-path: /tmp/uv-cache-disabled
|
||||||
@@ -861,7 +831,7 @@ jobs:
|
|||||||
- name: Fake pyproject.toml at root
|
- name: Fake pyproject.toml at root
|
||||||
run: cp __tests__/fixtures/old-python-constraint-project/pyproject.toml pyproject.toml
|
run: cp __tests__/fixtures/old-python-constraint-project/pyproject.toml pyproject.toml
|
||||||
- name: Setup with cache
|
- name: Setup with cache
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
@@ -874,7 +844,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install from custom manifest file
|
- name: Install from custom manifest file
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
manifest-file: "https://raw.githubusercontent.com/astral-sh/setup-uv/${{ github.ref }}/__tests__/download/custom-manifest.ndjson"
|
manifest-file: "https://raw.githubusercontent.com/astral-sh/setup-uv/${{ github.ref }}/__tests__/download/custom-manifest.ndjson"
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
@@ -889,12 +859,9 @@ jobs:
|
|||||||
test-download-from-astral-mirror-false:
|
test-download-from-astral-mirror-false:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install with download-from-astral-mirror disabled
|
- name: Install with download-from-astral-mirror disabled
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
download-from-astral-mirror: false
|
download-from-astral-mirror: false
|
||||||
- name: Verify uv is installed
|
- name: Verify uv is installed
|
||||||
@@ -903,14 +870,11 @@ jobs:
|
|||||||
test-absolute-path:
|
test-absolute-path:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Create requirements.txt
|
- name: Create requirements.txt
|
||||||
run: echo "uv==0.6.17" > /tmp/setup-uv-requirements.txt
|
run: echo "uv==0.6.17" > /tmp/setup-uv-requirements.txt
|
||||||
- name: Install from requirements file
|
- name: Install from requirements file
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
version-file: "/tmp/setup-uv-requirements.txt"
|
version-file: "/tmp/setup-uv-requirements.txt"
|
||||||
- name: Correct version gets installed
|
- name: Correct version gets installed
|
||||||
@@ -923,16 +887,13 @@ jobs:
|
|||||||
test-relative-path:
|
test-relative-path:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: mkdir
|
- name: mkdir
|
||||||
run: mkdir -p /tmp/setup-uv-test-relative-path
|
run: mkdir -p /tmp/setup-uv-test-relative-path
|
||||||
- name: Create requirements.txt
|
- name: Create requirements.txt
|
||||||
run: echo "uv==0.6.17" > /tmp/setup-uv-test-relative-path/setup-uv-requirements.txt
|
run: echo "uv==0.6.17" > /tmp/setup-uv-test-relative-path/setup-uv-requirements.txt
|
||||||
- name: Install from requirements file
|
- name: Install from requirements file
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
version-file: "./setup-uv-requirements.txt"
|
version-file: "./setup-uv-requirements.txt"
|
||||||
working-directory: "/tmp/setup-uv-test-relative-path"
|
working-directory: "/tmp/setup-uv-test-relative-path"
|
||||||
@@ -951,7 +912,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Setup uv
|
- name: Setup uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-prune-force
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-prune-force
|
||||||
- name: Create long running python script
|
- name: Create long running python script
|
||||||
@@ -974,7 +935,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Setup uv
|
- name: Setup uv
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
working-directory: __tests__/fixtures/cache-dir-defined-project
|
working-directory: __tests__/fixtures/cache-dir-defined-project
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
@@ -995,7 +956,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Setup uv with cache and python cache enabled
|
- name: Setup uv with cache and python cache enabled
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-python: true
|
cache-python: true
|
||||||
@@ -1022,7 +983,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Setup uv with cache
|
- name: Setup uv with cache
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-python: true
|
cache-python: true
|
||||||
@@ -1050,7 +1011,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
- name: Restore with cache
|
- name: Restore with cache
|
||||||
id: restore
|
id: restore
|
||||||
uses: ./
|
uses: $/
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-python: true
|
cache-python: true
|
||||||
@@ -1081,12 +1042,9 @@ jobs:
|
|||||||
expected-python-dir: "D:\\a\\_temp\\uv-python-dir"
|
expected-python-dir: "D:\\a\\_temp\\uv-python-dir"
|
||||||
runs-on: ${{ matrix.inputs.os }}
|
runs-on: ${{ matrix.inputs.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install latest version
|
- name: Install latest version
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: $/
|
||||||
- name: Check Python dir is expected dir
|
- name: Check Python dir is expected dir
|
||||||
run: |
|
run: |
|
||||||
if [ "$UV_PYTHON_INSTALL_DIR" != "${{ matrix.inputs.expected-python-dir }}" ]; then
|
if [ "$UV_PYTHON_INSTALL_DIR" != "${{ matrix.inputs.expected-python-dir }}" ]; then
|
||||||
@@ -1097,21 +1055,6 @@ jobs:
|
|||||||
- name: Install python works
|
- name: Install python works
|
||||||
run: uv python install
|
run: uv python install
|
||||||
|
|
||||||
test-act:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install act
|
|
||||||
run: gh extension install https://github.com/nektos/gh-act
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
- name: Run test-uvx with act
|
|
||||||
run: gh act -j test-uvx -P ubuntu-latest=catthehacker/ubuntu:act-latest
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
|
|
||||||
test-workflow-run:
|
test-workflow-run:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -1187,7 +1130,6 @@ jobs:
|
|||||||
- test-cache-python-installs
|
- test-cache-python-installs
|
||||||
- test-restore-python-installs
|
- test-restore-python-installs
|
||||||
- test-python-install-dir
|
- test-python-install-dir
|
||||||
- test-act
|
|
||||||
- test-workflow-run
|
- test-workflow-run
|
||||||
- validate-typings
|
- validate-typings
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
Reference in New Issue
Block a user