Skip to content

Commit a6496c9

Browse files
Merge pull request #104 from Create-Python-App/fix/45-pr-validation
ci: add test/lint/typecheck workflows (#45)
2 parents c2524ef + f40d72b commit a6496c9

3 files changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Lint
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
workflow_dispatch:
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: astral-sh/setup-uv@v6
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version-file: .python-version
17+
- run: uv sync --group dev
18+
- run: uv run ruff check .
19+
- run: uv run ruff format --check .

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
workflow_dispatch:
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: astral-sh/setup-uv@v6
14+
with:
15+
enable-cache: true
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version-file: .python-version
19+
- run: uv sync --group dev
20+
- run: uv run pytest --cov --cov-report=term-missing

.github/workflows/type-check.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Typecheck
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
workflow_dispatch:
8+
jobs:
9+
typecheck:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: astral-sh/setup-uv@v6
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version-file: .python-version
17+
- run: uv sync --group dev
18+
- run: uv run pyright

0 commit comments

Comments
 (0)