Refine CI workflows to use `uv sync` and simplify command invocations (#2149)
This commit is contained in:
parent
9fcabc8b9a
commit
9955f0137a
|
|
@ -30,7 +30,7 @@ jobs:
|
|||
|
||||
- name: 🎨 Augment paths in README
|
||||
run: |
|
||||
uv run python .github/scripts/augment_links.py README.md --branch ${{ github.head_ref || github.ref_name }}
|
||||
python .github/scripts/augment_links.py README.md --branch ${{ github.head_ref || github.ref_name }}
|
||||
cat README.md
|
||||
|
||||
- name: 🔗 Link Checker
|
||||
|
|
@ -45,9 +45,9 @@ jobs:
|
|||
|
||||
- name: 🏗️ Build source and wheel distributions
|
||||
run: |
|
||||
uv pip install -r pyproject.toml --group build
|
||||
uv sync --frozen --group build
|
||||
uv build
|
||||
uv run twine check --strict dist/*
|
||||
twine check --strict dist/*
|
||||
|
||||
- name: 📤 Upload distribution artifacts
|
||||
uses: actions/upload-artifact@v6
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
activate-environment: true
|
||||
|
||||
- name: 🏗️ Install dependencies
|
||||
run: uv pip install -r pyproject.toml --group docs
|
||||
run: uv sync --frozen --group docs
|
||||
|
||||
- name: 🧪 Test Docs Build
|
||||
run: uv run mkdocs build --verbose
|
||||
run: mkdocs build --verbose
|
||||
|
|
|
|||
|
|
@ -42,13 +42,13 @@ jobs:
|
|||
activate-environment: true
|
||||
|
||||
- name: 🚀 Install Packages
|
||||
run: uv pip install -r pyproject.toml --group dev --group docs --extra metrics
|
||||
run: uv sync --frozen --group dev --group docs --extra metrics
|
||||
|
||||
- name: 📦 Run the Import test
|
||||
run: uv run python -c "import supervision; from supervision import assets; from supervision import metrics; print(supervision.__version__)"
|
||||
run: python -c "import supervision; from supervision import assets; from supervision import metrics; print(supervision.__version__)"
|
||||
|
||||
- name: 🧪 Run the Test
|
||||
run: uv run pytest src/ tests/ --cov=supervision --cov-report=xml
|
||||
run: pytest src/ tests/ --cov=supervision --cov-report=xml
|
||||
|
||||
- name: Generate Coverage Report
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ jobs:
|
|||
activate-environment: true
|
||||
|
||||
- name: 🏗️ Install dependencies
|
||||
run: uv pip install -r pyproject.toml --group docs
|
||||
run: uv sync --frozen --group docs
|
||||
|
||||
- name: ⚙️ Configure git for github-actions
|
||||
run: |
|
||||
|
|
@ -49,7 +49,7 @@ jobs:
|
|||
env:
|
||||
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
uv run mike deploy --push develop
|
||||
mike deploy --push develop
|
||||
|
||||
- name: 🚀 Deploy Release Docs
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
|
|
@ -57,4 +57,4 @@ jobs:
|
|||
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
|
||||
uv run mike deploy --push --update-aliases $latest_tag latest
|
||||
mike deploy --push --update-aliases $latest_tag latest
|
||||
|
|
|
|||
Loading…
Reference in New Issue