@@ -16,24 +16,16 @@ jobs:
1616 steps :
1717 - uses : actions/checkout@v2
1818 - name : Set up Python
19- uses : actions/setup-python@v2
19+ uses : actions/setup-python@v5
2020 with :
2121 python-version : 3.11
22- - name : Format with isort
23- working-directory : sdks/bk-storages
24- run : |
25- pip install isort==5.12.0
26- isort . --settings-path=pyproject.toml
27- - name : Format with black
28- working-directory : sdks/bk-storages
29- run : |
30- pip install black==23.7.0 click==8.1.6
31- black . --config=pyproject.toml
32- - name : Lint with flake8
33- working-directory : sdks/bk-storages
34- run : |
35- pip install flake8==4.0.1 pyproject-flake8==0.0.1a5
36- pflake8 . --config=pyproject.toml
22+ - name : Setup uv
23+ uses : astral-sh/setup-uv@v5
24+ - name : Install Poetry system-wide
25+ # Use uv install to install poetry directly instead github action for simplicity
26+ run : uv pip install --system poetry==2.1.3
27+ - name : Ruff check
28+ run : poetry install && poetry run ruff check ./sdks/bk-storages --config ./pyproject.toml
3729 - name : Lint with mypy
3830 working-directory : sdks/bk-storages
3931 run : |
@@ -43,21 +35,50 @@ jobs:
4335 strategy :
4436 fail-fast : false
4537 matrix :
46- python-version : ["3.8", "3. 9", "3.10", "3.11"]
38+ python-version : ["3.9", "3.10", "3.11"]
4739 os : [ubuntu-latest, macos-latest]
4840 runs-on : ${{ matrix.os }}
4941 steps :
5042 - uses : actions/checkout@v2
5143 - name : Set up Python
52- uses : actions/setup-python@v2
44+ uses : actions/setup-python@v5
5345 with :
5446 python-version : ${{ matrix.python-version }}
47+ - name : Setup uv
48+ uses : astral-sh/setup-uv@v5
49+ - name : Install Nox
50+ run : uv pip install --system nox==2025.11.12
51+ - name : Show nox version
52+ working-directory : sdks/bk-storages
53+ run : nox --version
54+ - name : Run tests on ${{ matrix.os }}
55+ working-directory : sdks/bk-storages
56+ run : nox --non-interactive --error-on-missing-interpreters --session "tests(python='${{ matrix.python-version }}')" -- --full-trace
57+
58+ build :
59+ runs-on : macos-latest
60+ if : github.event.release && contains(github.event.release.tag_name, 'bk-storages')
61+ steps :
62+ - uses : actions/checkout@v2
63+ - name : Set up Python
64+ uses : actions/setup-python@v5
65+ with :
66+ python-version : 3.11
5567 - name : Set up Poetry
5668 uses : abatilo/actions-poetry@v2.3.0
5769 with :
58- poetry-version : 1.5 .1
59- - name : Test bk-storages
70+ poetry-version : 2.1 .1
71+ - name : Build bk-storages
6072 run : |
6173 cd sdks/bk-storages
6274 poetry install
63- poetry run pytest
75+ poetry build
76+ echo "${{ github.event.release.tag_name }} ${{ github.sha }}" > Release.txt
77+ cat Release.txt
78+ - name : Release
79+ uses : softprops/action-gh-release@v1
80+ with :
81+ files : |
82+ Release.txt
83+ sdks/bk-storages/dist/*
84+
0 commit comments