Skip to content

Commit

Permalink
Setup uv with cache
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Aug 28, 2024
1 parent df65324 commit 4f36fa5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 46 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/api-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ jobs:
with:
python-version: 3.12

- uses: hynek/[email protected]

- name: Install tools
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
python -Im pip install -U pip
pipx install griffe nox
pipx list
uv tool install griffe
uv tool install nox
uv tool list
- name: Set REF
id: set-ref
Expand Down
28 changes: 12 additions & 16 deletions .github/workflows/cookiecutter-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,31 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Upgrade pip
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pip install pip
pip --version
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: hynek/[email protected]

- name: Install Poetry
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install poetry
uv tool install poetry
poetry --version
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install pre-commit
env:
UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install pre-commit
uv install tool pre-commit
pre-commit --version
- name: Install Nox
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install nox
uv install tool nox
nox --version
- name: Run Nox
Expand Down
36 changes: 10 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pip install pip
pip --version
- uses: hynek/[email protected]

- name: Install Nox
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install 'nox[uv]'
uv tool install nox
nox --version
- name: Run Nox
Expand Down Expand Up @@ -110,18 +105,12 @@ jobs:
with:
python-version: ${{ env.NOXPYTHON }}

- name: Upgrade pip
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pip install pip
pip --version
- uses: hynek/[email protected]
- name: Install Nox
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install 'nox[uv]'
uv tool install nox
nox --version
- name: Run Nox
Expand All @@ -141,23 +130,18 @@ jobs:
with:
python-version: '3.12'

- name: Upgrade pip
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pip install pip
pip --version
- uses: actions/download-artifact@v4
with:
pattern: coverage-data-*
merge-multiple: true

- uses: hynek/[email protected]

- name: Install Nox
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install 'nox[uv]'
uv tool install nox
nox --version
- run: nox --install-only
Expand Down

0 comments on commit 4f36fa5

Please sign in to comment.