Skip to content

Bump langchain from 0.0.350 to 0.1.0 in /components/llm_service #21

Bump langchain from 0.0.350 to 0.1.0 in /components/llm_service

Bump langchain from 0.0.350 to 0.1.0 in /components/llm_service #21

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# copier:raw
name: Unit test & lint for LLM Service
on:
pull_request:
branches:
- main
paths:
- "components/common/**"
- "components/llm_service/**"
- ".github/workflows/unit_test_linter_llm_service.yaml"
- ".pylintrc"
- "!components/llm_service/**.md"
workflow_dispatch:
env:
PROJECT_ID: ${{ vars.PROJECT_ID }}
NODE_VERSION: 18
jobs:
unit-test:
runs-on: ubuntu-latest
environment: develop
strategy:
fail-fast: false
matrix:
python-version: [3.9]
target-folder: [components/llm_service]
steps:
- uses: actions/checkout@v3
- id: auth
name: Auth with Service Account
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
install_components: gke-gcloud-auth-plugin
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{env.NODE_VERSION}}
- name: Install Firebase CLI and emulator
run: |
curl -sL https://firebase.tools | bash
firebase setup:emulators:firestore
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
BASE_DIR=$(pwd)
python -m pip install --upgrade pip
if [ -f $BASE_DIR/components/common/requirements.txt ]; then pip install -r $BASE_DIR/components/common/requirements.txt; fi
if [ -f $BASE_DIR/components/common/requirements-test.txt ]; then pip install -r $BASE_DIR/components/common/requirements-test.txt; fi
cd ${{ matrix.target-folder }}
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-test.txt ]; then pip install -r requirements-test.txt; fi
- name: Run pytest with coverage
run: |
BASE_DIR=$(pwd)
cd ${{ matrix.target-folder }}/src
PYTEST_ADDOPTS="--cache-clear --cov . " PYTHONPATH=$BASE_DIR/components/common/src python -m pytest
linter:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.9]
target-folder: [components/llm_service]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pylint
- name: Lint with pylint
run: |
BASE_DIR=$(pwd)
cd ${{ matrix.target-folder }}/src
python -m pylint $(git ls-files '*.py') --rcfile=$BASE_DIR/.pylintrc
# copier:endraw