Skip to content

Commit a8be60f

Browse files
committed
Continuous Integration finished
1 parent 524f0f9 commit a8be60f

File tree

8 files changed

+46
-17
lines changed

8 files changed

+46
-17
lines changed
Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,42 @@
1-
name: Build and Deploy Code
2-
31
on: [push, pull_request]
42
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+
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

app/routers/post.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

requirements.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ alembic==1.15.2
22
annotated-types==0.7.0
33
anyio==4.9.0
44
bcrypt==4.3.0
5-
certifi==2025.1.31
5+
certifi==2025.4.26
66
click==8.1.8
77
colorama==0.4.6
88
dnspython==2.7.0
99
email_validator==2.2.0
1010
fastapi==0.115.12
1111
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
1515
httptools==0.6.4
1616
httpx==0.28.1
1717
idna==3.10
@@ -38,16 +38,16 @@ python-dotenv==1.1.0
3838
python-multipart==0.0.20
3939
PyYAML==6.0.2
4040
rich==14.0.0
41-
rich-toolkit==0.14.1
41+
rich-toolkit==0.14.3
4242
shellingham==1.5.4
4343
sniffio==1.3.1
4444
SQLAlchemy==2.0.40
4545
sqlmodel==0.0.24
46-
starlette==0.46.1
46+
starlette==0.46.2
4747
typer==0.15.2
4848
typing-inspection==0.4.0
49-
typing_extensions==4.13.1
49+
typing_extensions==4.13.2
5050
ujson==5.10.0
51-
uvicorn==0.34.0
51+
uvicorn==0.34.2
5252
watchfiles==1.0.5
5353
websockets==15.0.1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)