@@ -20,35 +20,25 @@ jobs:
2020 steps :
2121 - uses : actions/checkout@v2
2222 - name : Set up Python
23- uses : actions/setup-python@v2
23+ uses : actions/setup-python@v5
2424 with :
2525 python-version : 3.11
26- - name : Format with isort
27- working-directory : sdks/bkpaas-auth
28- run : |
29- pip install isort==5.12.0
30- isort . --settings-path=pyproject.toml
31- - name : Format with black
32- working-directory : sdks/bkpaas-auth
33- run : |
34- pip install black==23.7.0 click==8.1.6
35- black . --config=pyproject.toml
36- - name : Lint with flake8
37- working-directory : sdks/bkpaas-auth
38- run : |
39- pip install flake8==4.0.1 pyproject-flake8==0.0.1a5
40- pflake8 . --config=pyproject.toml
26+ - name : Setup uv
27+ uses : astral-sh/setup-uv@v5
28+ - name : Install Poetry system-wide
29+ # Use uv install to install poetry directly instead github action for simplicity
30+ run : uv pip install --system poetry==2.1.3
31+ - name : Ruff check
32+ run : poetry install && poetry run ruff check ./sdks/bkpaas-auth --config ./pyproject.toml
4133 - name : Lint with mypy
4234 working-directory : sdks/bkpaas-auth
43- run : |
44- pip install mypy==1.12.0 types-mock==4.0.15.2 types-requests==2.32.0.20241016 types-six==1.16.21.20241009
45- mypy . --config-file=pyproject.toml
35+ run : poetry install && poetry run mypy . --config-file=./pyproject.toml
4636
4737 test :
4838 strategy :
4939 fail-fast : false
5040 matrix :
51- python-version : ["3.8", "3. 9", "3.10", "3.11"]
41+ python-version : ["3.9", "3.10", "3.11"]
5242 os : [ubuntu-latest, macos-latest]
5343 runs-on : ${{ matrix.os }}
5444 steps :
@@ -57,40 +47,36 @@ jobs:
5747 uses : actions/setup-python@v2
5848 with :
5949 python-version : ${{ matrix.python-version }}
60- - name : Set up Poetry
61- uses : abatilo/actions-poetry@v2.3.0
62- with :
63- poetry-version : 1.5.1
64- - name : Install dependencies
50+ - name : Setup uv
51+ uses : astral-sh/setup-uv@v5
52+ - name : Install Nox
53+ run : uv pip install --system nox==2025.11.12
54+ - name : Show nox version
6555 working-directory : sdks/bkpaas-auth
66- run : |
67- poetry export --without-hashes --dev -o requirements-dev.txt
68- python -m pip install --upgrade pip
69- python -m pip install -r requirements-dev.txt
70- python -m pip install tox-gh-actions==2.8.1
71- - name : Run test with tox targets for ${{ matrix.python-version }}
56+ run : nox --version
57+ - name : Run tests on ${{ matrix.os }}
7258 working-directory : sdks/bkpaas-auth
73- run : tox
59+ run : nox --non-interactive --error-on-missing-interpreters --session "tests(python='${{ matrix.python-version }}')" -- --full-trace
7460
7561 build :
7662 runs-on : macos-latest
7763 if : github.event.release && contains(github.event.release.tag_name, 'bkpaas-auth')
7864 steps :
7965 - uses : actions/checkout@v2
8066 - name : Set up Python
81- uses : actions/setup-python@v2
67+ uses : actions/setup-python@v5
8268 with :
83- python-version : 3.8
69+ python-version : 3.11
8470 - name : Set up Poetry
8571 uses : abatilo/actions-poetry@v2.3.0
8672 with :
87- poetry-version : 1.5 .1
73+ poetry-version : 2.1 .1
8874 - name : Build bkpaas-auth
8975 run : |
9076 cd sdks/bkpaas-auth
9177 poetry install
9278 poetry build
93- echo "${{ github.event.relesae .tag_name }} ${{ github.sha }}" > Release.txt
79+ echo "${{ github.event.release .tag_name }} ${{ github.sha }}" > Release.txt
9480 cat Release.txt
9581 - name : Release
9682 uses : softprops/action-gh-release@v1
0 commit comments