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-
31on : [push, pull_request]
42jobs :
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+
626 runs-on : ubuntu-latest
727 steps :
8- - name : pulling git repo
28+ - name : Check out repository code
929 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
1035 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(
8383 detail = "Not authorised to perform requsted action" ,
8484 )
8585
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 )
8888 db .add (existing_post )
8989 db .commit ()
9090 db .refresh (existing_post )
Original file line number Diff line number Diff line change @@ -2,16 +2,16 @@ alembic==1.15.2
22annotated-types == 0.7.0
33anyio == 4.9.0
44bcrypt == 4.3.0
5- certifi == 2025.1.31
5+ certifi == 2025.4.26
66click == 8.1.8
77colorama == 0.4.6
88dnspython == 2.7.0
99email_validator == 2.2.0
1010fastapi == 0.115.12
1111fastapi-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
1515httptools == 0.6.4
1616httpx == 0.28.1
1717idna == 3.10
@@ -38,16 +38,16 @@ python-dotenv==1.1.0
3838python-multipart == 0.0.20
3939PyYAML == 6.0.2
4040rich == 14.0.0
41- rich-toolkit == 0.14.1
41+ rich-toolkit == 0.14.3
4242shellingham == 1.5.4
4343sniffio == 1.3.1
4444SQLAlchemy == 2.0.40
4545sqlmodel == 0.0.24
46- starlette == 0.46.1
46+ starlette == 0.46.2
4747typer == 0.15.2
4848typing-inspection == 0.4.0
49- typing_extensions == 4.13.1
49+ typing_extensions == 4.13.2
5050ujson == 5.10.0
51- uvicorn == 0.34.0
51+ uvicorn == 0.34.2
5252watchfiles == 1.0.5
5353websockets == 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