This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Mysels/master
Optimization
- Loading branch information
Showing
3 changed files
with
111 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# 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: auto-sign | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
schedule: | ||
- cron: 30,0,57,27 16 * * * | ||
# watch: | ||
# types: started | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
env: | ||
TZ: Asia/Shanghai | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Setup Java JRE | ||
uses: actions/[email protected] | ||
with: | ||
java-version: 1.8 | ||
java-package: jre | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Prepare the jobs | ||
run: | | ||
sudo apt install tesseract-ocr tesseract-ocr-chi-sim | ||
sudo apt install tesseract-ocr-eng | ||
curl -L -v -o temp.jar https://github.com/ZimoLoveShuang/wisedu-unified-login-api/releases/download/v1.0.8/wisedu-unified-login-api-v1.0.jar | ||
ls | ||
pwd | ||
java -version | ||
(java -jar ./temp.jar &) | ||
python3 -m pip install --upgrade pip | ||
pip install setuptools flake8 wheel | ||
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 --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Run with schedule. | ||
run: | | ||
python3 index.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,8 @@ users: | |
username: '161105024' | ||
#password 密码 | ||
password: '161105024' | ||
#address 地址,定位信息 | ||
address: 中国河南省xx市xx区xx路 | ||
#address 地址,定位信息 中国河南省xx市xx区xx路 | ||
address: 中国河南省 | ||
#email 接受通知消息的邮箱 | ||
email: [email protected] | ||
#school 学校全称 | ||
|
@@ -42,4 +42,4 @@ cpdaily: | |
# #表单项标题 | ||
# title: 体温 | ||
# #表单项默认值 | ||
# value: 正常 | ||
# value: 正常 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters