Skip to content

Commit 5744766

Browse files
committed
use uv
1 parent 5ac6a9f commit 5744766

4 files changed

Lines changed: 28 additions & 10 deletions

File tree

.github/workflows/pytest.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,9 @@ jobs:
3232
with:
3333
persist-credentials: false
3434

35-
- name: Set up Python environment
36-
uses: actions/setup-python@v5
37-
38-
- name: Install dependencies
39-
run: |
40-
pip install pytest ruyaml
41-
4235
- name: Run tests
4336
run: |
44-
pytest
37+
pipx install uv
38+
uvx --with ruyaml pytest
4539
env:
4640
GH_TOKEN: ${{ github.token }}

.github/workflows/update_actions.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,17 @@ jobs:
2929
with:
3030
persist-credentials: true
3131

32+
- run: pipx install uv
33+
3234
- name: Update actions.yml
33-
shell: python
35+
shell: uv run {0}
3436
run: |
37+
# /// script
38+
# requires-python = ">=3.13"
39+
# dependencies = [
40+
# "ruyaml",
41+
# ]
42+
# ///
3543
import sys
3644
sys.path.append("./gateway/")
3745

.github/workflows/update_dummy.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,17 @@ jobs:
2929
# We have to use a PAT to commit the workflow file
3030
token: ${{ secrets.ALLOWLIST_WORKFLOW_TOKEN || github.token }}
3131

32+
- run: pipx install uv
33+
3234
- name: Update Workflow
33-
shell: python
35+
shell: uv run {0}
3436
run: |
37+
# /// script
38+
# requires-python = ">=3.13"
39+
# dependencies = [
40+
# "ruyaml",
41+
# ]
42+
# ///
3543
import sys
3644
sys.path.append("./gateway/")
3745

gateway/gateway.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
# /// script
2+
# requires-python = ">=3.13"
3+
# dependencies = [
4+
# "ruyaml",
5+
# ]
6+
# ///
7+
18
import os
29
from datetime import date, timedelta
310
from pathlib import Path
411
from typing import Dict, NotRequired, TypedDict
512

613
import ruyaml
714

15+
816
class RefDetails(TypedDict):
917
"""
1018
Type definition for reference details of GitHub Actions for actions.yml

0 commit comments

Comments
 (0)