Skip to content

Commit

Permalink
Change uv manuall installation to setup-uv in CI (#1871)
Browse files Browse the repository at this point in the history
* Change uv manuall installation to setup-uv in CI

* Delete pip install uv from all jobs

* Change setup-uv action's version from 1 to 3

* Add pre-commit's fixing

---------

Co-authored-by: Pavel Epanov <pavelepanov@MacBook-Air-Pavel.local>
  • Loading branch information
pavelepanov and Pavel Epanov authored Oct 23, 2024
1 parent 9a0356e commit a6ebb05
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 20 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docs_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- uses: actions/setup-python@v5
with:
python-version: 3.x
Expand All @@ -28,7 +31,6 @@ jobs:
path: .cache
- run: |
set -ux
python -m pip install uv
uv pip install --system -e .[dev]
uv pip uninstall --system email-validator # This is to fix broken link in docs
- run: ./scripts/build-docs.sh
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docs_update-references.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -35,7 +38,6 @@ jobs:
# should install with `-e`
run: |
set -ux
python -m pip install uv
uv pip install --system -e .[dev]
- name: Run build docs
run: bash scripts/build-docs.sh
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docs_update-release-notes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
Expand All @@ -39,7 +41,6 @@ jobs:

- name: Install dependencies
run: |
python -m pip install uv
uv pip install --system requests
- name: Run update_releases.py script
Expand Down
57 changes: 42 additions & 15 deletions .github/workflows/pr_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -73,7 +76,6 @@ jobs:
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[optionals,testing]
- name: Install Pydantic v1
if: matrix.pydantic-version == 'pydantic-v1'
Expand Down Expand Up @@ -102,14 +104,16 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[optionals,testing]
- name: Test
run: >
Expand All @@ -121,14 +125,16 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[optionals,testing]
- name: Test
run: >
Expand All @@ -140,14 +146,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[kafka,test-core,cli]
- name: Test
run: >
Expand Down Expand Up @@ -179,14 +187,16 @@ jobs:
ALLOW_PLAINTEXT_LISTENER: "true"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[optionals,testing]
- run: mkdir coverage
- name: Test
Expand All @@ -209,14 +219,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[confluent,test-core,cli]
- name: Test
run: >
Expand Down Expand Up @@ -248,14 +260,16 @@ jobs:
ALLOW_PLAINTEXT_LISTENER: "true"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[optionals,testing]
- run: mkdir coverage
- name: Test
Expand All @@ -278,14 +292,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[rabbit,test-core,cli]
- name: Test
run: >
Expand All @@ -306,14 +322,16 @@ jobs:
- 5672:5672
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[optionals,testing]
- run: mkdir coverage
- name: Test
Expand All @@ -336,14 +354,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[nats,test-core,cli]
- name: Test
run: >
Expand All @@ -364,14 +384,16 @@ jobs:
- 4222:4222
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[optionals,testing]
- run: mkdir coverage
- name: Test
Expand All @@ -394,14 +416,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[redis,test-core,cli]
- name: Test
run: >
Expand All @@ -422,14 +446,16 @@ jobs:
- 6379:6379
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install uv
uv pip install --system .[optionals,testing]
- run: mkdir coverage
- name: Test
Expand Down Expand Up @@ -460,7 +486,9 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v3
with:
version: "latest"
- uses: actions/setup-python@v5
with:
python-version: "3.8"
Expand All @@ -473,7 +501,6 @@ jobs:
merge-multiple: true

- run: |
python -m pip install uv
uv pip install --system coverage[toml]
- run: ls -la coverage
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/publish_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- uses: astral-sh/setup-uv@v3
with:
version: "latest"

- run: |
python -m pip install uv
uv pip install --system smokeshow
- uses: dawidd6/action-download-artifact@v6 # nosemgrep
Expand Down

0 comments on commit a6ebb05

Please sign in to comment.