Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
0e94714
feat: delete api
GlintonLiao Nov 18, 2024
bdf2e92
Add to branch
Kevin990001 Nov 19, 2024
a27ef7e
add db creation sql
Nov 19, 2024
e4d57e6
Merge pull request #7 from developergc/db
developergc Nov 19, 2024
f956982
Merge pull request #6 from developergc/delete-api
developergc Nov 19, 2024
e51eccf
update api
ChenluRu Nov 19, 2024
02eb4bb
feat: ci
GlintonLiao Nov 20, 2024
3ff61b7
fix: bugs
GlintonLiao Nov 20, 2024
de8a8af
Merge pull request #8 from developergc/feat-ci
GlintonLiao Nov 20, 2024
30fff5e
feat: delete api logic
GlintonLiao Nov 27, 2024
effbbc7
Merge pull request #9 from developergc/delete-api
GlintonLiao Nov 27, 2024
fa322c7
feat: cd
GlintonLiao Nov 27, 2024
28eed68
fix: bugs
GlintonLiao Nov 27, 2024
66d3cee
fix: bugs
GlintonLiao Nov 27, 2024
936ee78
fix: bugs
GlintonLiao Nov 27, 2024
402eee7
fix: bugs
GlintonLiao Nov 27, 2024
ee48e9d
fix: bugs
GlintonLiao Nov 27, 2024
feb450c
fix: bugs
GlintonLiao Nov 27, 2024
cfb2320
Merge pull request #10 from developergc/feat-cd
GlintonLiao Nov 27, 2024
5dfaeb3
fix: tests and docs
GlintonLiao Dec 1, 2024
d8deb1d
fix: missing docstring
GlintonLiao Dec 1, 2024
33959a4
Merge pull request #11 from developergc/delete-api
GlintonLiao Dec 1, 2024
095d3cf
Merge pull request #12 from developergc/chi
Kevin990001 Dec 2, 2024
8c8fe0f
add test
Kevin990001 Dec 2, 2024
e478182
add readme
Kevin990001 Dec 2, 2024
baad1de
update readme
Kevin990001 Dec 2, 2024
a2f8412
Merge branch 'main' into update-api
ChenluRu Dec 3, 2024
469d2f6
update and test
ChenluRu Dec 3, 2024
617afbe
fix: bugs
GlintonLiao Dec 3, 2024
f01845b
fix: bugs
GlintonLiao Dec 3, 2024
f31fe25
fix: db
GlintonLiao Dec 3, 2024
bd66cdb
Merge pull request #13 from developergc/update-api
GlintonLiao Dec 3, 2024
eda695c
Update README.md
ChenluRu Dec 3, 2024
7969985
Update README.md
ChenluRu Dec 3, 2024
03d4245
Update README.md
ChenluRu Dec 3, 2024
05fbbae
Update README.md
ChenluRu Dec 3, 2024
2fa7d5d
Merge pull request #14 from developergc/update-api
ChenluRu Dec 3, 2024
80be56c
add get and create feature
Dec 3, 2024
45a92a7
Merge pull request #15 from developergc/getandcreate
developergc Dec 3, 2024
b13b42f
test: create and retrieve
GlintonLiao Dec 3, 2024
c7baac1
test: create and retrieve
GlintonLiao Dec 3, 2024
4d0af68
test: create and retrieve
GlintonLiao Dec 3, 2024
e57eb9a
Merge pull request #16 from developergc/test-create-retrieve
GlintonLiao Dec 3, 2024
5087ac4
Update README.md
ChenluRu Dec 3, 2024
cfc9c16
update readme
Kevin990001 Dec 3, 2024
72070a6
update
Kevin990001 Dec 3, 2024
22bbdfb
feat: search
GlintonLiao Dec 4, 2024
d4348ef
fix: tests
GlintonLiao Dec 4, 2024
babd226
Merge pull request #17 from developergc/test-create-retrieve
GlintonLiao Dec 4, 2024
57d7d4b
Update README.md
ChenluRu Dec 4, 2024
80ed7c6
Update README.md
ChenluRu Dec 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CD Pipeline

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
cd:
runs-on: ubuntu-latest

steps:
# Checkout the code
- name: Checkout Code
uses: actions/checkout@v3

# Build Docker Image
- name: Build Docker Image
run: docker build -t my-api .

# Run the Docker Container
- name: Run Docker Container
run: docker run -d --name my-container -p 8080:80 my-api

# Test the Running Container
- name: Test API Endpoints
run: |
sleep 10 # Allow some time for the container to start
curl --fail http://0.0.0.0:8080/docs || exit 1
echo "API is accessible and working!"

# Stop and Remove the Container
- name: Cleanup
run: |
docker stop my-container
docker rm my-container
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI Pipeline

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ci:
runs-on: ubuntu-latest

steps:
# Checkout the code
- name: Checkout Code
uses: actions/checkout@v4

# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

# Install dependencies
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pylint pytest

# Run linter (Pylint)
- name: Run Pylint
run: |
echo "Running Pylint..."
pylint **/*.py

# Run tests
# - name: Run Tests
# run: |
# echo "Running Tests..."
# pytest tests/

# Logs for debugging
- name: Debugging Logs
run: |
echo "Installed Python Version:"
python --version
echo "Installed Packages:"
pip list
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.10
#
WORKDIR /code
#
COPY ./requirements.txt /code/requirements.txt
#
RUN pip install --no-cache-dir -r /code/requirements.txt
#
COPY . /code
#
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
Loading