mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-13 08:35:15 -05:00
ci(llamaindex): Added auto lint and integration test config (#72)
This PR adds CI workflows for linting and integration tests to the Llamaindex SDK. Linting is failing due to type checking errors in the SDK (to be fixed separately). Integration tests are failing since there are no existing tests.
This commit is contained in:
28
.github/workflows/lint-llamaindex-fallback.yaml
vendored
Normal file
28
.github/workflows/lint-llamaindex-fallback.yaml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# Copyright 2024 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: llamaindex
|
||||
on:
|
||||
pull_request:
|
||||
paths: # These paths are the inverse of lint.yml
|
||||
- "sdks/llamaindex/**/*.md"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: none
|
||||
|
||||
steps:
|
||||
- run: echo "No tests required."
|
||||
52
.github/workflows/lint-llamaindex.yaml
vendored
Normal file
52
.github/workflows/lint-llamaindex.yaml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# Copyright 2024 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: llamaindex
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'sdks/llamaindex/**'
|
||||
- '!sdks/llamaindex/**/*.md'
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install library requirements
|
||||
run: pip install -r sdks/llamaindex/requirements.txt
|
||||
|
||||
- name: Install test requirements
|
||||
run: pip install sdks/llamaindex[test]
|
||||
|
||||
- name: Run linters
|
||||
run: |
|
||||
black --check .
|
||||
isort --check .
|
||||
|
||||
- name: Run type-check
|
||||
run: mypy --install-types --non-interactive --explicit-package-bases sdks/llamaindex
|
||||
Reference in New Issue
Block a user