Skip to content

Commit d9db543

Browse files
add workflows to check and release
1 parent c63e78d commit d9db543

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ updates:
2121
directory: /packages/uvicorn-hmr
2222
schedule:
2323
interval: daily
24+
- package-ecosystem: github-actions
25+
directory: /
26+
schedule:
27+
interval: daily

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CI
2+
3+
on: [push, fork, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
typos:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: crate-ci/typos@master
11+
12+
check:
13+
strategy:
14+
matrix:
15+
os: [ubuntu, macos]
16+
fail-fast: false
17+
runs-on: ${{ matrix.os }}-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up Python
21+
uses: astral-sh/setup-uv@v5
22+
with:
23+
python-version: 3.13
24+
enable-cache: true
25+
cache-dependency-glob: |
26+
**/pyproject.toml
27+
- name: Install dependencies
28+
run: |
29+
uv pip install basedpyright \
30+
-r pyproject.toml \
31+
-r examples/demo/pyproject.toml \
32+
-r examples/fastapi/pyproject.toml \
33+
-r examples/flask/pyproject.toml \
34+
-r packages/uvicorn-hmr/pyproject.toml
35+
- name: Linting
36+
run: |
37+
ruff format --check --diff
38+
ruff check --diff
39+
- name: Check typing
40+
run: basedpyright
41+
42+
publish:
43+
runs-on: ubuntu-latest
44+
environment: release
45+
strategy:
46+
matrix:
47+
dir:
48+
- uvicorn-hmr
49+
fail-fast: false
50+
needs: [typos, check]
51+
permissions:
52+
id-token: write
53+
steps:
54+
- uses: actions/checkout@v4
55+
with:
56+
sparse-checkout: packages/${{ matrix.dir }}
57+
- name: Set up Python
58+
uses: astral-sh/setup-uv@v5
59+
with:
60+
python-version: 3.13
61+
- name: Build packages
62+
run: |
63+
uv build packages/${{ matrix.dir }}
64+
- name: Publish to PyPI
65+
continue-on-error: true
66+
run: uv publish

0 commit comments

Comments
 (0)