File tree Expand file tree Collapse file tree 8 files changed +46
-17
lines changed Expand file tree Collapse file tree 8 files changed +46
-17
lines changed Original file line number Diff line number Diff line change 1
- name : Build and Deploy Code
2
-
3
1
on : [push, pull_request]
4
2
jobs :
5
- job1 :
3
+ CI :
4
+ environment :
5
+ name : Testing
6
+ env :
7
+ DATABASE_URL : ${{ secrets.DATABASE_URL }}
8
+ TEST_DATABASE_URL : ${{ secrets.TEST_DATABASE_URL }}
9
+ SECRET_KEY : ${{ secrets.SECRET_KEY }}
10
+ ALGORITHM : ${{ secrets.ALGORITHM }}
11
+ ACCESS_TOKEN_EXPIRE_MINUTES : ${{ secrets.ACCESS_TOKEN_EXPIRE_MINUTES }}
12
+ services :
13
+ postgres :
14
+ image : postgres
15
+ env :
16
+ POSTGRES_PASSWORD : ${{ secrets.POSTGRES_PASSWORD}}
17
+ POSTGRES_DB : ${{ secrets.POSTGRES_DB }}
18
+ ports :
19
+ - 5432:5432
20
+ options : >-
21
+ --health-cmd pg_isready
22
+ --health-interval 10s
23
+ --health-timeout 5s
24
+ --health-retries 5
25
+
6
26
runs-on : ubuntu-latest
7
27
steps :
8
- - name : pulling git repo
28
+ - name : Check out repository code
9
29
uses : actions/checkout@v4
30
+ - name : List repository files
31
+ run : |
32
+ ls ${{ github.workspace }}
33
+ - name : setup python
34
+ uses : actions/setup-python@v5
10
35
with :
11
- sparse-checkout : .
12
- - name : Testing CI
13
- run : echo "Test completed"
36
+ python-version : ' 3.13'
37
+ - name : upgrade pip
38
+ run : python -m pip install --upgrade pip
39
+ - name : install all dependencies
40
+ run : pip install -r requirements.txt
41
+ - name : Testing with pytest
42
+ run : pytest -v -s
Original file line number Diff line number Diff line change @@ -83,8 +83,8 @@ async def update_post(
83
83
detail = "Not authorised to perform requsted action" ,
84
84
)
85
85
86
- hero_data = post .model_dump (exclude_unset = True )
87
- existing_post .sqlmodel_update (hero_data )
86
+ post_data = post .model_dump (exclude_unset = True )
87
+ existing_post .sqlmodel_update (post_data )
88
88
db .add (existing_post )
89
89
db .commit ()
90
90
db .refresh (existing_post )
Original file line number Diff line number Diff line change @@ -2,16 +2,16 @@ alembic==1.15.2
2
2
annotated-types == 0.7.0
3
3
anyio == 4.9.0
4
4
bcrypt == 4.3.0
5
- certifi == 2025.1.31
5
+ certifi == 2025.4.26
6
6
click == 8.1.8
7
7
colorama == 0.4.6
8
8
dnspython == 2.7.0
9
9
email_validator == 2.2.0
10
10
fastapi == 0.115.12
11
11
fastapi-cli == 0.0.7
12
- greenlet == 3.2.0
13
- h11 == 0.14 .0
14
- httpcore == 1.0.7
12
+ greenlet == 3.2.1
13
+ h11 == 0.16 .0
14
+ httpcore == 1.0.9
15
15
httptools == 0.6.4
16
16
httpx == 0.28.1
17
17
idna == 3.10
@@ -38,16 +38,16 @@ python-dotenv==1.1.0
38
38
python-multipart == 0.0.20
39
39
PyYAML == 6.0.2
40
40
rich == 14.0.0
41
- rich-toolkit == 0.14.1
41
+ rich-toolkit == 0.14.3
42
42
shellingham == 1.5.4
43
43
sniffio == 1.3.1
44
44
SQLAlchemy == 2.0.40
45
45
sqlmodel == 0.0.24
46
- starlette == 0.46.1
46
+ starlette == 0.46.2
47
47
typer == 0.15.2
48
48
typing-inspection == 0.4.0
49
- typing_extensions == 4.13.1
49
+ typing_extensions == 4.13.2
50
50
ujson == 5.10.0
51
- uvicorn == 0.34.0
51
+ uvicorn == 0.34.2
52
52
watchfiles == 1.0.5
53
53
websockets == 15.0.1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments