Skip to content

Commit

Permalink
ci: use uv action, extract versions to env
Browse files Browse the repository at this point in the history
  • Loading branch information
willcl-ark committed Sep 12, 2024
1 parent 328bc59 commit 6ef86bc
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
- main

env:
UV_SYSTEM_PYTHON: 1
PYTHON_VERSION: "3.12"
STERN_VERSION: "1.30.0"

jobs:

Expand All @@ -22,7 +23,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: eifinger/setup-uv@v1
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v2
with:
version: "latest"
enable-cache: true
- run: uvx ruff format . --check

build-image:
Expand Down Expand Up @@ -78,7 +83,13 @@ jobs:
with:
name: commander
path: /tmp
- uses: eifinger/setup-uv@v1
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v2
with:
version: "latest"
enable-cache: true
- name: Install Python
run: uv python install $PYTHON_VERSION
- name: Install project
run: uv sync --all-extras --dev
- name: Install commander image
Expand All @@ -95,7 +106,6 @@ jobs:
if: always()
run: |
echo "Installing stern..."
STERN_VERSION="1.30.0"
curl -Lo stern.tar.gz https://github.com/stern/stern/releases/download/v${STERN_VERSION}/stern_${STERN_VERSION}_linux_amd64.tar.gz
tar zxvf stern.tar.gz
chmod +x stern
Expand All @@ -120,7 +130,13 @@ jobs:
- graph_test.py
steps:
- uses: actions/checkout@v4
- uses: eifinger/setup-uv@v1
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v2
with:
version: "latest"
enable-cache: true
- name: Install Python
run: uv python install $PYTHON_VERSION
- name: Install project
run: uv sync --all-extras --dev
- name: Run tests
Expand Down

0 comments on commit 6ef86bc

Please sign in to comment.