-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (90 loc) · 3.62 KB
/
python-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [ master ]
paths: [python/**,.github/workflows/python-package.yml]
pull_request:
branches: [ master ]
paths: [python/**,.github/workflows/python-package.yml]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --ignore=E1,E2,E3,E5,W291,W292,W391,C901,E701 --max-complexity=10 --max-line-length=127 --statistics
- name: Install Package with pip
run: |
python -m pip install requests
python -m pip install beautifulsoup4
python -m pip install googletrans==4.0.0-rc1
python -m pip install pillow
- name: Test webapi.py common exception
run: |
python python/webapi.py
- name: Test webapi.py in command -> trs
run: |
python python/webapi.py --diswrite-file trs 英文 Google 给张泉铭一个相遇之缘
- name: Test webapi.py in command -> ip
run: |
python python/webapi.py --diswrite-file ip 66.66.66.66
- name: Test webapi.py in command -> pos
run: |
python python/webapi.py --diswrite-file pos 22.222,33.333
- name: Test webapi.py in command -> trsWd
run: |
python python/webapi.py --diswrite-file trsWd impact YouDao
- name: Test webapi.py in command -> face
run: |
python python/webapi.py --diswrite-file face b
- name: Test webapi.py in command -> check
run: |
python python/webapi.py --diswrite-file check 咋地啊咋地啊 给爷爬 你个sb
- name: Test webapi.py in command -> math
run: |
python python/webapi.py --diswrite-file math
- name: Test webapi.py in command -> hot
run: |
python python/webapi.py --diswrite-file hot
- name: Test webapi.py in command -> hotword
run: |
python python/webapi.py --diswrite-file hotword
- name: Test webapi.py in command -> zyb
run: |
python python/webapi.py --diswrite-file zyb 二次函数 0
- name: Test webapi.py in command -> shop
run: |
python python/webapi.py --diswrite-file shop
- name: Test webapi.py in command -> search
run: |
python python/webapi.py --diswrite-file search 天空之翼
- name: Test webapi.py in command -> photo
run: |
python python/webapi.py --diswrite-file photo -1
- name: Test webapi.py in command -> image_search
run: |
python python/webapi.py --diswrite-file image_search http://gchat.qpic.cn/gchatpic_new/3168287806/1019390914-2932721587-32A831A71CB9DA4AF3185AF882E1C7B4/0?term=2
- name: Test webyxp.py common exception
run: |
python python/webyxp.py
- name: Test image.py common exception
run: |
python python/image.py