Skip to content

fix rag documentation bug #42

fix rag documentation bug

fix rag documentation bug #42

Workflow file for this run

name: Test on Windows
on:
push:
branches:
- main
pull_request_target:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.event.pull_request.id || github.ref }}
cancel-in-progress: true
env:
POETRY_VERSION: "1.8.3"
PYTHON_VERSION: "3.10.9"
jobs:
win-basic_tests:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Fetch PR source branch
shell: bash
if: github.event_name == 'pull_request_target'
run: |
if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then
echo ${{ github.event.pull_request.head.repo.clone_url }}
echo ${{ github.event.pull_request.head.ref }}
git remote add external_repo ${{ github.event.pull_request.head.repo.clone_url }}
git fetch external_repo ${{ github.event.pull_request.head.ref }}:pr_branch
else
echo ${{ github.event.pull_request.head.ref }}
git fetch origin ${{ github.event.pull_request.head.ref }}:pr_branch
fi
- name: Merge PR branch into main
shell: bash
if: github.event_name == 'pull_request_target'
run: |
git config user.name "GitHub Actions Bot"
git config user.email "[email protected]"
git checkout main
git merge --no-ff pr_branch
git submodule update --init
- name: Copy poetry.lock to root directory
shell: bash
run: |
git branch
cd LazyLLM-Env && git branch
cd ..
cp LazyLLM-Env/poetry.lock .
ls
- name: Set up python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Download model
shell: bash
run: |
pip install modelscope pyyaml
mkdir C:/Users/runneradmin/.lazyllm
ls C:/Users/runneradmin/.lazyllm
mkdir -p C:/Users/runneradmin/.cache/modelscope/hub
ln -s C:/Users/runneradmin/.cache/modelscope/hub C:/Users/runneradmin/.lazyllm/model
modelscope download Shanghai_AI_Laboratory/internlm2-chat-7b &
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}
- name: Build project with Poetry
shell: bash
run: |
poetry build
- name: List dist directory
shell: bash
run: ls dist
- name: Install the built package
shell: bash
run: |
pip install dist/lazyllm*.whl
- name: basic_tests
shell: bash
run: |
git clone https://[email protected]/LazyAGI/LazyLLM-Data.git D:/a/LazyLLM/data
pip install -r tests/requirements.txt
export LAZYLLM_DATA_PATH=D:/a/LazyLLM/data
python -m pytest -m "not skip_on_win" -v --reruns=2 tests/basic_tests
timeout-minutes: 30
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
win-charge_tests:
if: |
!contains(github.event.head_commit.message, '[skip ci]')
&& !contains(github.event.pull_request.title, '[skip ci]')
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Merge PR branch into main
shell: bash
if: github.event_name == 'pull_request_target'
run: |
if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then
echo ${{ github.event.pull_request.head.repo.clone_url }}
echo ${{ github.event.pull_request.head.ref }}
git remote add external_repo ${{ github.event.pull_request.head.repo.clone_url }}
git fetch external_repo ${{ github.event.pull_request.head.ref }}:pr_branch
else
echo ${{ github.event.pull_request.head.ref }}
git fetch origin ${{ github.event.pull_request.head.ref }}:pr_branch
fi
- name: Merge PR branch into main
shell: bash
if: github.event_name == 'pull_request_target'
run: |
git config user.name "GitHub Actions Bot"
git config user.email "[email protected]"
git checkout main
git merge --no-ff pr_branch
git submodule update --init
- name: Copy poetry.lock to root directory
shell: bash
run: |
git branch
cd LazyLLM-Env && git branch
cd ..
cp LazyLLM-Env/poetry.lock .
- name: Set up python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}
- name: Build project with Poetry
shell: bash
run: |
poetry build
- name: List dist directory
shell: bash
run: ls dist
- name: Install the built package
shell: bash
run: |
pip install dist/lazyllm*.whl
- name: charge_tests
shell: bash
run : |
git clone https://[email protected]/LazyAGI/LazyLLM-Data.git D:/a/LazyLLM/data
pip install -r tests/requirements.txt
export LAZYLLM_DATA_PATH=D:/a/LazyLLM/data
python -m pytest -v --reruns=2 tests/charge_tests
env :
LAZYLLM_KIMI_API_KEY: ${{ secrets.LAZYLLM_KIMI_API_KEY }}
LAZYLLM_GLM_API_KEY: ${{ secrets.LAZYLLM_GLM_API_KEY }}
LAZYLLM_QWEN_API_KEY: ${{ secrets.LAZYLLM_QWEN_API_KEY }}
LAZYLLM_SENSENOVA_API_KEY: ${{ secrets.LAZYLLM_SENSENOVA_API_KEY }}
LAZYLLM_SENSENOVA_SECRET_KEY: ${{ secrets.LAZYLLM_SENSENOVA_SECRET_KEY }}
LAZYLLM_PostgreSQL_URL: ${{ secrets.LAZYLLM_PostgreSQL_URL }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
timeout-minutes: 30