feat: 设置强制更新到 20.4.1 版本,以处理检查登录状况的接口新增参数的问题 #1820
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
name: Lint And Test | |
on: | |
workflow_dispatch: | |
push: | |
release: | |
types: [ published ] | |
pull_request: | |
types: [ opened, synchronize ] | |
jobs: | |
lint: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version-file: '.python-version' | |
cache: 'pip' | |
cache-dependency-path: '**/requirements*.txt' | |
- name: Install Requirements | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install -r requirements_dev.txt | |
- name: Set time zone | |
run: tzutil /s "China Standard Time" | |
- name: lint | |
run: | | |
tox -e lint | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ windows-latest, ubuntu-20.04 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version-file: '.python-version' | |
- name: Install Requirements Windows | |
if: startsWith(matrix.os, 'windows') | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install -r requirements_dev.txt | |
- name: Install Requirements Ubuntu | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install -r requirements_linux_dev.txt | |
- name: Set time zone | |
uses: szenius/[email protected] | |
with: | |
timezoneLinux: "Asia/Shanghai" | |
timezoneMacos: "Asia/Shanghai" | |
timezoneWindows: "China Standard Time" | |
- name: Test for CodeCov | |
run: | | |
pytest -n auto --cov=./ --cov-report=xml --cov-report=term | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml | |
verbose: true | |
- name: Upload Codecov artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "coverage.xml" | |
path: ./coverage.xml | |
- name: Test for Coveralls | |
run: | | |
coverage run -m pytest . | |
- name: Upload coverage to Coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
coveralls --service=github |