fix: fix workflow
This commit is contained in:
@@ -13,7 +13,6 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
mypy:
|
mypy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -38,6 +37,11 @@ jobs:
|
|||||||
|
|
||||||
pytest:
|
pytest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
MONGO_HOST: ${{ secrets.MONGO_HOST }}
|
||||||
|
MONGO_PORT: ${{ secrets.MONGO_PORT }}
|
||||||
|
MONGO_USER: ${{ secrets.MONGO_USER }}
|
||||||
|
MONGO_PASS: ${{ secrets.MONGO_PASS }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -49,12 +53,7 @@ jobs:
|
|||||||
architecture: x64
|
architecture: x64
|
||||||
|
|
||||||
- name: Setup MongoDB
|
- name: Setup MongoDB
|
||||||
env:
|
run: docker run --name mongodb -d -p ${{ secrets.MONGO_PORT }}:27017 -e MONGO_INITDB_ROOT_USERNAME=${{ secrets.MONGO_USER }} -e MONGO_INITDB_ROOT_PASSWORD=${{ secrets.MONGO_PASS }} mongodb/mongodb-community-server
|
||||||
MONGO_HOST: ${{ env.MONGO_HOST }}
|
|
||||||
MONGO_PORT: ${{ env.MONGO_PORT }}
|
|
||||||
MONGO_USER: ${{ env.MONGO_USER }}
|
|
||||||
MONGO_PASS: ${{ env.MONGO_PASS }}
|
|
||||||
run: docker run --name mongodb -d -p $MONGO_PORT:27017 -e MONGO_INITDB_ROOT_USERNAME=$MONGO_USER -e MONGO_INITDB_ROOT_PASSWORD=$MONGO_PASS mongodb/mongodb-community-server
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
+1
-1
@@ -183,7 +183,7 @@ async def comment(comment_info: AddCommentBody,
|
|||||||
|
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
config = uvicorn.Config("main:app", port=5000, log_level="debug",)
|
config = uvicorn.Config("main:app", port=5000, log_level="debug")
|
||||||
server = uvicorn.Server(config)
|
server = uvicorn.Server(config)
|
||||||
await server.serve()
|
await server.serve()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user