-
Notifications
You must be signed in to change notification settings - Fork 3
32 lines (30 loc) · 853 Bytes
/
Copy pathpython-app.yml
File metadata and controls
32 lines (30 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Library test, lint and typecheck
run-name: Test, lint and typecheck
on: [push]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.10"
- run: uv sync
- name: Lint with Ruff
run: uv run ./lint
- name: Test with pytest
run: uv run ./test
- name: Typecheck with ty
run: uv run ./typecheck
- name: Check project version
uses: maybe-hello-world/pyproject-check-version@v4
id: versioncheck
with:
pyproject-path: "./pyproject.toml"
- name: Publish the pypi project
if: steps.versioncheck.outputs.local_version_is_higher == 'true'
run: uv build && uv publish -t ${{ secrets.PYPI_TOKEN }}