ci: unittest

This commit is contained in:
RanKKI
2022-07-01 23:07:26 +08:00
parent 6d505d73ac
commit abde83d59a
3 changed files with 53 additions and 14 deletions

33
.github/workflows/unittest.yml vendored Normal file
View File

@@ -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

View File

@@ -1,3 +0,0 @@
#!/bin/bash
exec python -m unittest discover tests

View File

@@ -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
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