You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+9-50Lines changed: 9 additions & 50 deletions
Original file line number
Diff line number
Diff line change
@@ -13,61 +13,31 @@ jobs:
13
13
runs-on: ubuntu-latest
14
14
steps:
15
15
- uses: actions/checkout@v4
16
-
- name: Install uv
17
-
uses: astral-sh/setup-uv@v5
18
-
with:
19
-
enable-cache: true
20
-
cache-dependency-glob: "uv.lock"
21
-
- name: "Set up Python"
22
-
uses: actions/setup-python@v5
23
-
with:
24
-
python-version-file: ".python-version"
25
-
- name: Install dependencies
26
-
run: |
27
-
uv sync --extra dev
16
+
- uses: ./.github/actions/setup-python-dev
28
17
- name: Validate pyproject.toml
29
18
run: |
30
19
uv run validate-pyproject pyproject.toml
31
20
ruff:
32
21
runs-on: ubuntu-latest
33
22
steps:
34
23
- uses: actions/checkout@v4
35
-
- uses: chartboost/ruff-action@v1
24
+
- uses: ./.github/actions/setup-python-dev
25
+
- name: Check with ruff
26
+
run: |
27
+
uv run -m ruff check
36
28
mypy:
37
29
runs-on: ubuntu-latest
38
30
steps:
39
31
- uses: actions/checkout@v4
40
-
- name: Install uv
41
-
uses: astral-sh/setup-uv@v5
42
-
with:
43
-
enable-cache: true
44
-
cache-dependency-glob: "uv.lock"
45
-
- name: "Set up Python"
46
-
uses: actions/setup-python@v5
47
-
with:
48
-
python-version-file: ".python-version"
49
-
- name: Install dependencies
50
-
run: |
51
-
uv sync --extra dev
32
+
- uses: ./.github/actions/setup-python-dev
52
33
- name: Check with mypy
53
34
run: |
54
35
uv run -m mypy .
55
36
test:
56
37
runs-on: ubuntu-latest
57
38
steps:
58
39
- uses: actions/checkout@v4
59
-
- name: Install uv
60
-
uses: astral-sh/setup-uv@v5
61
-
with:
62
-
enable-cache: true
63
-
cache-dependency-glob: "uv.lock"
64
-
- name: "Set up Python"
65
-
uses: actions/setup-python@v5
66
-
with:
67
-
python-version-file: ".python-version"
68
-
- name: Install dependencies
69
-
run: |
70
-
uv sync --extra dev
40
+
- uses: ./.github/actions/setup-python-dev
71
41
- name: Test with pytest
72
42
run: |
73
43
uv run -m pytest --cov-report html
@@ -80,25 +50,14 @@ jobs:
80
50
runs-on: ubuntu-latest
81
51
steps:
82
52
- uses: actions/checkout@v4
83
-
- name: Install uv
84
-
uses: astral-sh/setup-uv@v5
85
-
with:
86
-
enable-cache: true
87
-
cache-dependency-glob: "uv.lock"
88
-
- name: "Set up Python"
89
-
uses: actions/setup-python@v5
90
-
with:
91
-
python-version-file: ".python-version"
92
-
- name: Install dependencies
93
-
run: |
94
-
uv sync --extra dev
53
+
- uses: ./.github/actions/setup-python-dev
95
54
- name: Check version consistency
96
55
run: |
97
56
echo "Checking version consistency across all package files..."
98
57
99
58
PACKAGE_NAME="example"
100
59
TOML_VERSION=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
101
-
LOCK_VERSION=$(uv run python -c "import tomllib; lock_data = tomllib.load(open('uv.lock', 'rb')); pkg = next((p for p in lock_data['package'] if p['name'] == '${PACKAGE_NAME/_/-}'), None); print(pkg['version'] if pkg else 'not found')")
60
+
LOCK_VERSION=$(uv run python -c "import tomllib; lock_data = tomllib.load(open('uv.lock', 'rb')); pkg = next((p for p in lock_data['package'] if p['name'] == '${PACKAGE_NAME}'), None); print(pkg['version'] if pkg else 'not found')")
0 commit comments