-
Notifications
You must be signed in to change notification settings - Fork 4
106 lines (90 loc) · 3.2 KB
/
Copy pathci-pythinker-sdk.yml
File metadata and controls
106 lines (90 loc) · 3.2 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: CI (pythinker-sdk)
on:
pull_request:
paths:
- ".github/workflows/ci-pythinker-sdk.yml"
- "sdks/pythinker-sdk/**"
- "pyproject.toml"
- "uv.lock"
push:
branches:
- main
paths:
- ".github/workflows/ci-pythinker-sdk.yml"
- "sdks/pythinker-sdk/**"
- "pyproject.toml"
- "uv.lock"
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13", "3.14"]
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # pinned from v6.2.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # pinned from v8.1.0
with:
version: "0.8.5"
enable-cache: true
cache-dependency-glob: uv.lock
- name: Install dependencies
env:
UV_PYTHON: ${{ steps.setup-python.outputs.python-path }}
run: uv sync --frozen --all-extras --project sdks/pythinker-sdk
- name: Run checks
env:
UV_PYTHON: ${{ steps.setup-python.outputs.python-path }}
run: make check-pythinker-sdk
- name: Run tests
env:
UV_PYTHON: ${{ steps.setup-python.outputs.python-path }}
run: make cov-pythinker-sdk
- name: Upload coverage to Codecov
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # pinned from v5.5.4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: sdks/pythinker-sdk/coverage.xml
flags: pythinker-sdk
name: pythinker-sdk-${{ matrix.python-version }}
fail_ci_if_error: false
docs:
runs-on: ubuntu-latest
env:
FOOTER_VERSION: ${{ github.ref_name }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
- name: Set up Python 3.14
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # pinned from v6.2.0
with:
python-version: "3.14"
allow-prereleases: true
- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # pinned from v8.1.0
with:
version: "0.8.5"
enable-cache: true
cache-dependency-glob: uv.lock
- name: Install dependencies
run: uv sync --frozen --all-extras --project sdks/pythinker-sdk
- name: Generate API documentation
run: |
uv run --project sdks/pythinker-sdk pdoc pythinker_sdk \
--docformat google \
--footer-text "pythinker-sdk ${FOOTER_VERSION}" \
-o sdks/pythinker-sdk/docs
- name: Upload docs preview
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # pinned from v7.0.1
with:
name: docs-preview
path: sdks/pythinker-sdk/docs