Skip to content
This repository was archived by the owner on May 1, 2026. It is now read-only.

Commit 6e77258

Browse files
committed
uv sync args for other python workflows - #7
1 parent cb0467c commit 6e77258

4 files changed

Lines changed: 24 additions & 9 deletions

File tree

.github/workflows/checking_python_pytest.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
type: string
1414
default: ''
1515
description: 'The argument string to pass to pytest (default is none)'
16+
uv-sync-args:
17+
required: false
18+
type: string
19+
default: '--extra dev'
20+
description: 'Argument string to pass to `uv sync --locked` when setting up the environment. E.g. passing --dev results in `uv sync --locked --dev'
1621

1722

1823

@@ -25,10 +30,10 @@ jobs:
2530
name: Pytest
2631
runs-on: ubuntu-latest
2732
steps:
28-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v5
2934

3035
- name: Set up Python 3.13
31-
uses: actions/setup-python@v3
36+
uses: actions/setup-python@v6
3237
with:
3338
python-version: "3.13"
3439

@@ -38,7 +43,7 @@ jobs:
3843
run: |
3944
curl -LsSf https://astral.sh/uv/install.sh | sh
4045
uv venv
41-
uv sync --extra dev
46+
uv sync --locked ${{ inputs.uv-sync-args }}
4247
gh extension install thetechcollective/gh-set-status --pin stable
4348
4449
- name: Test with pytest

.github/workflows/checking_python_pytest_matrix.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ on:
2020
type: string
2121
description: >
2222
Python versions to use, e.g. "['3.11', '3.12']". Must be a string representing a JSON array of strings.The tests will be run against all versions in parallel. The workflow run will run for all python versions regardless of individual failures. A failure in any python version will fail the workflow run.
23+
uv-sync-args:
24+
required: false
25+
type: string
26+
default: '--extra dev'
27+
description: 'Argument string to pass to `uv sync --locked` when setting up the environment. E.g. passing --dev results in `uv sync --locked --dev'
2328

2429
permissions:
2530
statuses: write
@@ -49,7 +54,7 @@ jobs:
4954
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5055
run: |
5156
gh extension install thetechcollective/gh-set-status --pin stable
52-
uv sync --locked --extra dev
57+
uv sync --locked ${{ inputs.uv-sync-args }}
5358
5459
- name: Run tests
5560
id: tests

.github/workflows/checking_python_ruff_format.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
type: boolean
1414
default: false
1515
description: 'When set to true, the workflow will continue even if there are errors'
16+
uv-sync-args:
17+
required: false
18+
type: string
19+
default: '--extra dev'
20+
description: 'Argument string to pass to `uv sync --locked` when setting up the environment. E.g. passing --dev results in `uv sync --locked --dev'
1621

1722
permissions:
1823
statuses: write
@@ -24,10 +29,10 @@ jobs:
2429
runs-on: ubuntu-latest
2530
steps:
2631
- name: Checkout
27-
uses: actions/checkout@v4
32+
uses: actions/checkout@v5
2833

2934
- name: Set up Python 3.13
30-
uses: actions/setup-python@v3
35+
uses: actions/setup-python@v6
3136
with:
3237
python-version: "3.13"
3338

@@ -37,7 +42,7 @@ jobs:
3742
run: |
3843
curl -LsSf https://astral.sh/uv/install.sh | sh
3944
uv venv
40-
uv sync --extra dev
45+
uv sync --locked ${{ inputs.uv-sync-args }}
4146
gh extension install thetechcollective/gh-set-status --pin stable
4247
4348
- name: Check with ruff

.github/workflows/checking_python_ruff_lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
required: false
1818
type: string
1919
default: '--extra dev'
20-
description: 'Argument string to pass to uv sync when setting up the environment'
20+
description: 'Argument string to pass to `uv sync --locked` when setting up the environment. E.g. passing --dev results in `uv sync --locked --dev'
2121

2222
permissions:
2323
statuses: write
@@ -42,7 +42,7 @@ jobs:
4242
run: |
4343
curl -LsSf https://astral.sh/uv/install.sh | sh
4444
uv venv
45-
uv sync ${{ inputs.uv-sync-args }}
45+
uv sync --locked ${{ inputs.uv-sync-args }}
4646
gh extension install thetechcollective/gh-set-status --pin stable
4747
4848
- name: Check with ruff

0 commit comments

Comments
 (0)