Skip to content

Commit 5932407

Browse files
committed
update gha
1 parent afed22f commit 5932407

2 files changed

Lines changed: 24 additions & 11 deletions

File tree

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
name: Lint
22
on: [push, pull_request]
3+
34
jobs:
45
lint:
56
runs-on: ubuntu-latest
67
steps:
7-
- uses: actions/checkout@v4
8+
- uses: actions/checkout@v5
9+
810
- name: Install uv
9-
uses: astral-sh/setup-uv@v3
11+
uses: astral-sh/setup-uv@v7
12+
13+
# install the requested Python for linting
1014
- name: Set up Python
1115
run: uv python install {{ python_default_version }}
16+
17+
# install dev dependencies (ruff, mypy, pre-commit, etc)
1218
- name: Install dependencies
13-
run: uv sync --extra dev
14-
- name: Run ruff
15-
run: uv run ruff check .
16-
- name: Run black
17-
run: uv run black --check .
19+
run: uv sync --extra dev --python {{ python_default_version }}
20+
21+
# check formatting
22+
- name: Check formatting with Ruff
23+
run: uv run --python {{ python_default_version }} ruff format --check .
24+
25+
# lint / autofixable style issues (but don't write fixes in CI)
26+
- name: Run Ruff lint
27+
run: uv run --python {{ python_default_version }} ruff check .

template/.github/workflows/publish.yml.jinja

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@ name: Upload Python Package
22
on:
33
release:
44
types: [published]
5+
56
jobs:
67
deploy:
78
runs-on: ubuntu-latest
89
steps:
9-
- uses: actions/checkout@v4
10+
- uses: actions/checkout@v5
11+
1012
- name: Install uv
11-
uses: astral-sh/setup-uv@v3
12-
- name: Set up Python
13-
run: uv python install {{ python_default_version }}
13+
uses: astral-sh/setup-uv@v7
14+
with:
15+
python-version: {{ python_default_version }}
16+
1417
- name: Build and publish
1518
env:
1619
TWINE_USERNAME: __token__

0 commit comments

Comments
 (0)