-
Notifications
You must be signed in to change notification settings - Fork 34
86 lines (82 loc) · 2.55 KB
/
bkpaas-auth.yml
File metadata and controls
86 lines (82 loc) · 2.55 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI Check for bkpaas-auth
on:
push:
branches: [master]
paths:
- "sdks/bkpaas-auth/**"
pull_request:
branches: [master]
paths:
- "sdks/bkpaas-auth/**"
workflow_dispatch:
release:
types: [published]
jobs:
check:
runs-on: macos-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Setup uv
uses: astral-sh/setup-uv@v5
- name: Install Poetry system-wide
# Use uv install to install poetry directly instead github action for simplicity
run: uv pip install --system poetry==2.1.3
- name: Ruff check
run: poetry install && poetry run ruff check ./sdks/bkpaas-auth --config ./pyproject.toml
- name: Lint with mypy
working-directory: sdks/bkpaas-auth
run: poetry install && poetry run mypy . --config-file=./pyproject.toml
test:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
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: Setup uv
uses: astral-sh/setup-uv@v5
- name: Install Nox
run: uv pip install --system nox==2025.11.12
- name: Show nox version
working-directory: sdks/bkpaas-auth
run: nox --version
- name: Run tests on ${{ matrix.os }}
working-directory: sdks/bkpaas-auth
run: nox --non-interactive --error-on-missing-interpreters --session "tests(python='${{ matrix.python-version }}')" -- --full-trace
build:
runs-on: macos-latest
if: github.event.release && contains(github.event.release.tag_name, 'bkpaas-auth')
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Set up Poetry
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 2.1.1
- name: Build bkpaas-auth
run: |
cd sdks/bkpaas-auth
poetry install
poetry build
echo "${{ github.event.release.tag_name }} ${{ github.sha }}" > Release.txt
cat Release.txt
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
Release.txt
sdks/bkpaas-auth/dist/*