diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml new file mode 100644 index 00000000..815dc66b --- /dev/null +++ b/.github/workflows/unittest.yml @@ -0,0 +1,33 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: unittest + +on: + push: + pull_request: + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Test + run: | + cd auto_bangumi + python -m unittest discover tests \ No newline at end of file diff --git a/auto_bangumi/test.sh b/auto_bangumi/test.sh deleted file mode 100755 index e12d8809..00000000 --- a/auto_bangumi/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -exec python -m unittest discover tests \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index cc2d907a..6abe3490 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,20 @@ -qbittorrent-api -bs4 -requests==2.28.0 -pysocks -lxml - -setuptools~=62.1.0 -fastapi -uvicorn~=0.17.6 -jinja2 -pydantic~=1.9.1 \ No newline at end of file +anyio==3.6.1 +beautifulsoup4==4.11.1 +certifi==2022.6.15 +charset-normalizer==2.1.0 +click==8.1.3 +fastapi==0.78.0 +h11==0.13.0 +idna==3.3 +pydantic==1.9.1 +PySocks==1.7.1 +qbittorrent-api==2022.5.32 +requests==2.28.1 +six==1.16.0 +sniffio==1.2.0 +soupsieve==2.3.2.post1 +starlette==0.19.1 +thefuzz==0.19.0 +typing_extensions==4.3.0 +urllib3==1.26.9 +uvicorn==0.18.2