Skip to content

Commit

Permalink
ci: cache uv (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored Aug 5, 2024
1 parent 84a7f93 commit 09be16b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,15 @@ jobs:
with:
python-version: '3.11'

- name: Upgrade nox and uv
run: |
python -m pip install --upgrade 'nox[uv]' pytest-benchmark
uv --version
nox --version
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.sha }}
fetch-depth: 0

- uses: hynek/setup-cached-uv@v2
- name: Install nox
run: uv pip install --system nox --upgrade

- name: Benchmark on base branch
run: nox -s bench -- --benchmark-save=base

Expand All @@ -52,4 +50,4 @@ jobs:

- name: Compare benchmark
if: always()
run: pytest-benchmark compare --group-by name
run: uvx pytest-benchmark compare --group-by name
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ jobs:
with:
python-version: '3.11'

- name: Upgrade nox and uv
run: |
python -m pip install --upgrade 'nox[uv]'
nox --version
uv --version
- uses: hynek/setup-cached-uv@v2
- name: Install nox
run: uv pip install --system nox --upgrade

- name: Build package
run: nox -s build
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ jobs:
with:
python-version: ${{ matrix.pyv }}

- name: Upgrade nox and uv
run: |
python -m pip install --upgrade 'nox[uv]'
nox --version
uv --version
- uses: hynek/setup-cached-uv@v2
- name: Install nox
run: uv pip install --system nox --upgrade

- name: Cache pre-commit hooks
uses: actions/cache@v4
Expand Down

0 comments on commit 09be16b

Please sign in to comment.