enhance: bk-storage 支持 python3.11.x (#170) #87
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: CI Check for bk-storages | |
on: | |
push: | |
branches: [ master, staging ] | |
paths: | |
- 'sdks/bk-storages/**' | |
pull_request: | |
branches: [ master, staging ] | |
paths: | |
- 'sdks/bk-storages/**' | |
workflow_dispatch: | |
jobs: | |
check: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Format with isort | |
run: | | |
pip install isort==5.9.2 | |
isort sdks/ --settings-path=sdks/bk-storages/pyproject.toml | |
- name: Format with black | |
run: | | |
pip install black==21.7b0 click==8.0.4 | |
black sdks/ --config=sdks/bk-storages/pyproject.toml | |
- name: Lint with flake8 | |
run: | | |
pip install pyproject-flake8 | |
pflake8 sdks/ --config=sdks/bk-storages/pyproject.toml | |
- name: Lint with mypy | |
run: | | |
pip install mypy==0.910 types-requests==2.25.0 types-setuptools==57.0.0 types-dataclasses==0.1.5 types-redis==3.5.4 types-PyMySQL==1.0.0 types-six==0.1.7 types-toml==0.1.3 | |
mypy sdks/bk-storages --config-file=sdks/bk-storages/pyproject.toml | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10'] | |
poetry-version: [1.3.2] | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Test bk-storages | |
run: | | |
cd sdks/bk-storages | |
poetry install | |
poetry run pytest |