Skip to content

Commit 6967ed1

Browse files
committed
chore: force uv sync if outdated in CI
1 parent ea53652 commit 6967ed1

File tree

1 file changed

+50
-38
lines changed

1 file changed

+50
-38
lines changed

.github/workflows/test.yml

Lines changed: 50 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ on:
77
push:
88
branches: [main]
99
paths:
10-
- .github/workflows/test.yml
11-
- tap_geo/**
12-
- tests/**
13-
- pyproject.toml
14-
- uv.lock
10+
- .github/workflows/test.yml
11+
- tap_geo/**
12+
- tests/**
13+
- pyproject.toml
14+
- uv.lock
1515
pull_request:
1616
branches: [main]
1717
paths:
18-
- .github/workflows/test.yml
19-
- tap_geo/**
20-
- tests/**
21-
- pyproject.toml
22-
- uv.lock
18+
- .github/workflows/test.yml
19+
- tap_geo/**
20+
- tests/**
21+
- pyproject.toml
22+
- uv.lock
2323
workflow_dispatch:
2424

2525
env:
@@ -33,37 +33,49 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
python-version:
36-
- "3.10"
37-
- "3.11"
38-
- "3.12"
39-
- "3.13"
36+
- "3.10"
37+
- "3.11"
38+
- "3.12"
39+
- "3.13"
4040
steps:
41-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
42-
- name: Set up Python ${{ matrix.python-version }}
43-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
44-
with:
45-
python-version: ${{ matrix.python-version }}
46-
- name: Setup uv
47-
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
48-
with:
49-
version: ">=0.8"
50-
- name: Run Tox
51-
run: |
52-
uvx --with=tox-uv tox -e $(echo py${{ matrix.python-version }} | tr -d .)
41+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
42+
- name: Set up Python ${{ matrix.python-version }}
43+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
- name: Setup uv
47+
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
48+
with:
49+
version: ">=0.8"
50+
- name: Regenerate lockfile if needed
51+
run: |
52+
if ! uv lock --check; then
53+
echo "uv.lock is outdated; regenerating..."
54+
uv lock
55+
fi
56+
- name: Run Tox
57+
run: |
58+
uvx --with=tox-uv tox -e $(echo py${{ matrix.python-version }} | tr -d .)
5359
5460
typing:
5561
name: Type Checking
5662
runs-on: ubuntu-latest
5763
steps:
58-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
59-
- name: Set up Python
60-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
61-
with:
62-
python-version: 3.x
63-
- name: Setup uv
64-
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
65-
with:
66-
version: ">=0.8"
67-
- name: Run Tox
68-
run: |
69-
uvx --with=tox-uv tox -e typing
64+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
65+
- name: Set up Python
66+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
67+
with:
68+
python-version: 3.x
69+
- name: Setup uv
70+
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
71+
with:
72+
version: ">=0.8"
73+
- name: Regenerate lockfile if needed
74+
run: |
75+
if ! uv lock --check; then
76+
echo "uv.lock is outdated; regenerating..."
77+
uv lock
78+
fi
79+
- name: Run Tox
80+
run: |
81+
uvx --with=tox-uv tox -e typing

0 commit comments

Comments
 (0)