test #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test on macOS | |
on: | |
push: | |
branches: | |
- main | |
- lwj/update_action | |
pull_request_target: | |
branches: | |
- main | |
- lwj/update_action | |
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: | |
macos-basic_tests: | |
runs-on: macos-13 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Use custom Fetch and Merge Action | |
uses: ./.github/actions/fetch-and-merge | |
- name: Copy poetry.lock to root directory | |
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 | |
run: | | |
poetry build | |
- name: List dist directory | |
run: ls dist | |
- name: Install the built package | |
run: | | |
pip install dist/lazyllm*.whl | |
- name: basic_tests | |
run : | | |
git clone https://[email protected]/LazyAGI/LazyLLM-Data.git /tmp/lazyllm/data | |
pip install -r tests/requirements.txt | |
export LAZYLLM_DATA_PATH=/tmp/lazyllm/data | |
python -m pytest -v --reruns=2 tests/basic_tests/ | |
timeout-minutes: 25 | |
env : | |
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
macos-charge_tests: | |
runs-on: macos-13 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Use custom Fetch and Merge Action | |
uses: ./.github/actions/fetch-and-merge | |
- name: Copy poetry.lock to root directory | |
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 | |
run: | | |
poetry build | |
- name: List dist directory | |
run: ls dist | |
- name: Install the built package | |
run: | | |
pip install dist/lazyllm*.whl | |
- name: charge_tests | |
run : | | |
git clone https://[email protected]/LazyAGI/LazyLLM-Data.git /tmp/lazyllm/data | |
pip install -r tests/requirements.txt | |
export LAZYLLM_DATA_PATH=/tmp/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: 25 |