From f76b41865620d03c9f6908e36e4ca160422df25b Mon Sep 17 00:00:00 2001 From: mallocnew <41033874+mallocnew@users.noreply.github.com> Date: Fri, 16 May 2025 01:52:10 +0800 Subject: [PATCH] Create python-app.yml --- .github/workflows/python-app.yml | 32 ++++++++++++++++++++++++++++++++ requirements.txt | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 000000000..e210bc0a2 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,32 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python application + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.13 + uses: actions/setup-python@v3 + with: + python-version: "3.13" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Run main.py + run: | + python main.py && exit 0 diff --git a/requirements.txt b/requirements.txt index 5ae9cf283..dd08f6d05 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ aiohttp==3.10.11 aiofiles==24.1.0 botocore==1.29.76 fastapi==0.115.0 -pydantic==2.4.0 +pydantic==2.11.4 uvicorn==0.23.2 tortoise-orm==0.20.0 python-multipart==0.0.20