File tree 7 files changed +36
-5
lines changed
7 files changed +36
-5
lines changed Original file line number Diff line number Diff line change 6
6
push :
7
7
branches :
8
8
- main
9
+ - feature/pytest
9
10
pull_request :
10
11
11
12
jobs :
26
27
27
28
- name : Run Ruff
28
29
run : ruff check backend # Lint the entire repository
30
+
31
+ - name : Run Ruff
32
+ run : ruff check backend # Lint the entire repository
33
+ backend-test :
34
+ runs-on : ubuntu-latest
35
+ services :
36
+ # Label used to access the service container
37
+ postgres :
38
+ # Docker Hub image
39
+ image : postgres
40
+ # Provide the password for postgres
41
+ env :
42
+ POSTGRES_PASSWORD : postgres
43
+ # Set health checks to wait until postgres has started
44
+ options : >-
45
+ --health-cmd pg_isready
46
+ --health-interval 10s
47
+ --health-timeout 5s
48
+ --health-retries 5
49
+ steps :
50
+ - name : Check out repository code
51
+ uses : actions/checkout@v4
52
+
53
+ - uses : eifinger/setup-rye@v4
54
+ - name : Run tests
55
+ run : rye run pytest
29
56
frontend-lint :
30
57
runs-on : ubuntu-latest
31
58
Original file line number Diff line number Diff line change 1
- from .app import app
2
-
3
- __all__ = [app ]
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ dependencies = [
20
20
" psycopg2>=2.9.10" ,
21
21
" sqlalchemy-utils>=0.41.2" ,
22
22
" pydantic-settings>=2.6.0" ,
23
+ " mypy>=1.13.0" ,
23
24
]
24
25
readme = " README.md"
25
26
requires-python = " >= 3.8"
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ markupsafe==3.0.2
72
72
mdurl==0.1.2
73
73
# via markdown-it-py
74
74
mypy==1.13.0
75
+ # via task-management
75
76
mypy-extensions==1.0.0
76
77
# via black
77
78
# via mypy
Original file line number Diff line number Diff line change @@ -68,6 +68,10 @@ markupsafe==3.0.2
68
68
# via jinja2
69
69
mdurl==0.1.2
70
70
# via markdown-it-py
71
+ mypy==1.13.0
72
+ # via task-management
73
+ mypy-extensions==1.0.0
74
+ # via mypy
71
75
packaging==24.1
72
76
# via pytest
73
77
passlib==1.7.4
@@ -125,6 +129,7 @@ typer==0.12.5
125
129
# via fastapi-cli
126
130
typing-extensions==4.12.2
127
131
# via fastapi
132
+ # via mypy
128
133
# via pydantic
129
134
# via pydantic-core
130
135
# via sqlalchemy
Original file line number Diff line number Diff line change 6
6
from sqlmodel import Session
7
7
8
8
from app .main import app
9
- from backend . app .users .models import User
9
+ from app .users .models import User
10
10
from app .auth import get_current_active_user , hash_password
11
11
from app .db import (
12
12
get_engine ,
Original file line number Diff line number Diff line change 1
1
from fastapi .testclient import TestClient
2
2
from sqlmodel import Session
3
- from backend . app .tasks .models import Task
3
+ from app .tasks .models import Task
4
4
5
5
6
6
def test_create_task (client : TestClient ):
You can’t perform that action at this time.
0 commit comments