Skip to content

Commit 851ad99

Browse files
committed
ci setup
1 parent a42f05c commit 851ad99

File tree

7 files changed

+448
-9
lines changed

7 files changed

+448
-9
lines changed

.github/sync-repo-settings.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,21 @@ branchProtectionRules:
3030
- "conventionalcommits.org"
3131
- "header-check"
3232
# Add required status checks like presubmit tests
33-
- "langchain-python-sdk-pr-py313 (toolbox-testing-438616)"
34-
- "langchain-python-sdk-pr-py312 (toolbox-testing-438616)"
35-
- "langchain-python-sdk-pr-py311 (toolbox-testing-438616)"
36-
- "langchain-python-sdk-pr-py310 (toolbox-testing-438616)"
37-
- "langchain-python-sdk-pr-py39 (toolbox-testing-438616)"
3833
- "core-python-sdk-pr-py313 (toolbox-testing-438616)"
3934
- "core-python-sdk-pr-py312 (toolbox-testing-438616)"
4035
- "core-python-sdk-pr-py311 (toolbox-testing-438616)"
4136
- "core-python-sdk-pr-py310 (toolbox-testing-438616)"
4237
- "core-python-sdk-pr-py39 (toolbox-testing-438616)"
38+
- "langchain-python-sdk-pr-py313 (toolbox-testing-438616)"
39+
- "langchain-python-sdk-pr-py312 (toolbox-testing-438616)"
40+
- "langchain-python-sdk-pr-py311 (toolbox-testing-438616)"
41+
- "langchain-python-sdk-pr-py310 (toolbox-testing-438616)"
42+
- "langchain-python-sdk-pr-py39 (toolbox-testing-438616)"
43+
- "llamaindex-python-sdk-pr-py313 (toolbox-testing-438616)"
44+
- "llamaindex-python-sdk-pr-py312 (toolbox-testing-438616)"
45+
- "llamaindex-python-sdk-pr-py311 (toolbox-testing-438616)"
46+
- "llamaindex-python-sdk-pr-py310 (toolbox-testing-438616)"
47+
- "llamaindex-python-sdk-pr-py39 (toolbox-testing-438616)"
4348
requiredApprovingReviewCount: 1
4449
requiresCodeOwnerReviews: true
4550
requiresStrictStatusChecks: true
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: llamaindex
16+
on:
17+
pull_request:
18+
paths:
19+
- 'packages/toolbox-llamaindex/**'
20+
- '!packages/toolbox-llamaindex/**/*.md'
21+
pull_request_target:
22+
types: [labeled]
23+
24+
# Declare default permissions as read only.
25+
permissions: read-all
26+
27+
jobs:
28+
lint:
29+
if: "${{ github.event.action != 'labeled' || github.event.label.name == 'tests: run' }}"
30+
name: lint
31+
runs-on: ubuntu-latest
32+
concurrency:
33+
group: ${{ github.workflow }}-${{ github.ref }}
34+
cancel-in-progress: true
35+
defaults:
36+
run:
37+
working-directory: ./packages/toolbox-llamaindex
38+
permissions:
39+
contents: 'read'
40+
issues: 'write'
41+
pull-requests: 'write'
42+
steps:
43+
- name: Remove PR Label
44+
if: "${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
45+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
46+
with:
47+
github-token: ${{ secrets.GITHUB_TOKEN }}
48+
script: |
49+
try {
50+
await github.rest.issues.removeLabel({
51+
name: 'tests: run',
52+
owner: context.repo.owner,
53+
repo: context.repo.repo,
54+
issue_number: context.payload.pull_request.number
55+
});
56+
} catch (e) {
57+
console.log('Failed to remove label. Another job may have already removed it!');
58+
}
59+
- name: Checkout code
60+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+
with:
62+
ref: ${{ github.event.pull_request.head.sha }}
63+
repository: ${{ github.event.pull_request.head.repo.full_name }}
64+
token: ${{ secrets.GITHUB_TOKEN }}
65+
- name: Setup Python
66+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
67+
with:
68+
python-version: "3.13"
69+
70+
- name: Install library requirements
71+
run: pip install -r requirements.txt
72+
73+
- name: Install test requirements
74+
run: pip install .[test]
75+
76+
- name: Run linters
77+
run: |
78+
black --check .
79+
isort --check .
80+
81+
- name: Run type-check
82+
env:
83+
MYPYPATH: './src'
84+
run: mypy --install-types --non-interactive --cache-dir=.mypy_cache/ -p toolbox_llamaindex

.github/workflows/schedule_reporter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
contents: 'read'
2727
uses: ./.github/workflows/cloud_build_failure_reporter.yml
2828
with:
29-
trigger_names: "langchain-python-sdk-test-nightly,langchain-python-sdk-test-on-merge,core-python-sdk-test-nightly,core-python-sdk-test-on-merge"
29+
trigger_names: "core-python-sdk-test-nightly,core-python-sdk-test-on-merge,langchain-python-sdk-test-nightly,langchain-python-sdk-test-on-merge,llamaindex-python-sdk-test-nightly,llamaindex-python-sdk-test-on-merge"

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"packages/toolbox-langchain":"0.1.0","packages/toolbox-core":"0.1.0"}
1+
{"packages/toolbox-langchain":"0.1.0","packages/toolbox-core":"0.1.0","packages/toolbox-llamaindex":"0.1.1"}

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ Please refer to each API's `CHANGELOG.md` file under the `packages/` directory
22

33
Changelogs
44
-----
5-
- [toolbox-langchain==0.1.0](https://github.com/googleapis/mcp-toolbox-sdk-python/tree/main/packages/toolbox-langchain/CHANGELOG.md)
65
- [toolbox-core==0.1.0](https://github.com/googleapis/mcp-toolbox-sdk-python/tree/main/packages/toolbox-core/CHANGELOG.md)
6+
- [toolbox-langchain==0.1.0](https://github.com/googleapis/mcp-toolbox-sdk-python/tree/main/packages/toolbox-langchain/CHANGELOG.md)
7+
- [toolbox-llamaindex==0.1.1](https://github.com/googleapis/mcp-toolbox-sdk-python/tree/main/packages/toolbox-llamaindex/CHANGELOG.md)
8+

0 commit comments

Comments
 (0)