-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from mihamieat/develop
feat: merge develop into master
- Loading branch information
Showing
24 changed files
with
853 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[run] | ||
omit = src/gpac_api/app/db/database.py, src/gpac_api/app/utils/lifespan.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: GPacAPI FastAPI CI | ||
'on': | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
- feature/* | ||
- fix/* | ||
- hotfix/* | ||
- refactor/* | ||
- test/* | ||
- ci/* | ||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11.6 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pipx | ||
pipx install poetry | ||
poetry install | ||
- name: Run pylint | ||
run: poetry run pylint src/ | ||
- name: Run black check | ||
run: poetry run black . --check --diff -v | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11.6 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pipx | ||
pipx install poetry | ||
poetry install | ||
- name: run build | ||
run: poetry build | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
mongodb-version: ['5.0', '6.0', '7.0'] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11.6 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pipx | ||
pipx install poetry | ||
poetry install | ||
- name: Install and run MongoDB | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: ${{ matrix.mongodb-version }} | ||
- name: Run Tests | ||
run: poetry run pytest --cov=src tests/ --junitxml=junit.xml -o junit_family=legacy | ||
- name: Upload coverage report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-report | ||
path: junit.xml | ||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: GPacAPI FastAPI CD | ||
'on': | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: '${{ vars.DOCKERHUB_USERNAME }}' | ||
password: '${{ secrets.DOCKERHUB_TOKEN }}' | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
tags: '${{ vars.DOCKERHUB_USERNAME }}/gpac-api:0.1.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ coverage.xml | |
*.cover | ||
*.py,cover | ||
*.hypothesis/ | ||
junit.xml | ||
|
||
# Old files | ||
*_old* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3.8' | ||
|
||
services: | ||
mongodb: | ||
image: mongo:6.0 | ||
container_name: mongodb_test | ||
ports: | ||
- "27017:27017" | ||
volumes: | ||
- mongo_data:/data/db | ||
|
||
volumes: | ||
mongo_data: |
Oops, something went wrong.