-
Notifications
You must be signed in to change notification settings - Fork 28
63 lines (62 loc) · 1.87 KB
/
bk-storages.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
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.11
- name: Format with isort
working-directory: sdks/bk-storages
run: |
pip install isort==5.12.0
isort . --settings-path=pyproject.toml
- name: Format with black
working-directory: sdks/bk-storages
run: |
pip install black==23.7.0 click==8.1.6
black . --config=pyproject.toml
- name: Lint with flake8
working-directory: sdks/bk-storages
run: |
pip install flake8==4.0.1 pyproject-flake8==0.0.1a5
pflake8 . --config=pyproject.toml
- name: Lint with mypy
working-directory: sdks/bk-storages
run: |
pip install mypy==0.910 types-requests==2.31.0.2 types-setuptools==57.4.18 types-dataclasses==0.1.7 types-redis==3.5.18 types-PyMySQL==1.1.0.1 types-six==0.1.9 types-toml==0.1.5
mypy . --config-file=pyproject.toml
test:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
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: 1.5.1
- name: Test bk-storages
run: |
cd sdks/bk-storages
poetry install
poetry run pytest