Skip to content

Commit 8b73bf9

Browse files
committed
Add GitHub actions for testing, type checking and code formatting.
1 parent 6159662 commit 8b73bf9

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

.github/workflows/main.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
8+
jobs:
9+
pytest:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version:
15+
- "3.13"
16+
services:
17+
postgres:
18+
image: postgres
19+
env:
20+
POSTGRES_PASSWORD: postgres
21+
options: >-
22+
--health-cmd pg_isready
23+
--health-interval 10s
24+
--health-timeout 5s
25+
--health-retries 5
26+
ports:
27+
- 5432:5432
28+
steps:
29+
- uses: actions/checkout@v6
30+
- uses: astral-sh/setup-uv@v6
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
- run: uv run pytest
34+
env:
35+
DATABASE_URL: postgres://postgres:postgres@localhost:5432/reko_test
36+
POSTGRES_PORT: 5432
37+
38+
mypy:
39+
runs-on: ubuntu-latest
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
python-version:
44+
- "3.13"
45+
steps:
46+
- uses: actions/checkout@v6
47+
- uses: astral-sh/setup-uv@v6
48+
with:
49+
python-version: ${{ matrix.python-version }}
50+
- run: uv run mypy
51+
52+
ruff-format:
53+
runs-on: ubuntu-latest
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
python-version:
58+
- "3.13"
59+
steps:
60+
- uses: actions/checkout@v6
61+
- uses: astral-sh/setup-uv@v6
62+
with:
63+
python-version: ${{ matrix.python-version }}
64+
- run: uv run ruff format --check
65+
66+
ruff-check:
67+
runs-on: ubuntu-latest
68+
strategy:
69+
fail-fast: false
70+
matrix:
71+
python-version:
72+
- "3.13"
73+
steps:
74+
- uses: actions/checkout@v6
75+
- uses: astral-sh/setup-uv@v6
76+
with:
77+
python-version: ${{ matrix.python-version }}
78+
- run: uv run ruff check

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ dist/
33
*.egg-info/
44
.venv
55
.*_cache/
6+
uv.lock

0 commit comments

Comments
 (0)