forked from LazyAGI/LazyLLM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
52 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
name: Build and Test on macOS and Windows | ||
name: Test on macOS | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'pyproject2.toml' | ||
- '.github/**' | ||
branches: | ||
- main | ||
- lwj/poetry_install | ||
pull_request: | ||
paths: | ||
- 'pyproject2.toml' | ||
- '.github/**' | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
@@ -18,8 +18,8 @@ env: | |
POETRY_VERSION: "1.8.3" | ||
|
||
jobs: | ||
macos-build-test: | ||
runs-on: macOS-latest | ||
macos-basic_tests: | ||
runs-on: macos-13 | ||
|
||
strategy: | ||
matrix: | ||
|
@@ -55,44 +55,18 @@ jobs: | |
run: | | ||
pip install dist/lazyllm*.whl | ||
# - name: Run tests | ||
# run: python -m pytest -v tests/basic_tests/ | ||
# if: matrix.python-version == '3.10' | ||
|
||
- name: charge_tests | ||
run : | | ||
export LAZYLLM_KIMI_API_KEY=$LAZYLLM_KIMI_API_KEY | ||
export LAZYLLM_GLM_API_KEY=$LAZYLLM_GLM_API_KEY | ||
export LAZYLLM_QWEN_API_KEY=$LAZYLLM_QWEN_API_KEY | ||
export LAZYLLM_SENSENOVA_API_KEY=$LAZYLLM_SENSENOVA_API_KEY | ||
export LAZYLLM_SENSENOVA_SECRET_KEY=$LAZYLLM_SENSENOVA_SECRET_KEY | ||
export LAZYLLM_PostgreSQL_URL=$LAZYLLM_PostgreSQL_URL | ||
git clone https://github.com/lwj-st/lazyllm_data.git /tmp/lazyllm/data | ||
pip install -r tests/requirements.txt | ||
export LAZYLLM_DATA_PATH=/tmp/lazyllm/data | ||
python -m pytest -v -s 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 }} | ||
timeout-minutes: 60 | ||
|
||
- 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 -s tests/basic_tests/ | ||
python -m pytest -v --reruns=2 tests/basic_tests/ | ||
timeout-minutes: 20 | ||
env : | ||
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | ||
|
||
|
||
|
||
|
||
|
||
windows-build-test: | ||
runs-on: windows-latest | ||
macos-charge_tests: | ||
runs-on: macos-13 | ||
|
||
strategy: | ||
matrix: | ||
|
@@ -105,8 +79,7 @@ jobs: | |
fetch-depth: 0 | ||
|
||
- name: Copy poetry.lock to root directory | ||
run: Copy-Item LazyLLM-Env/poetry.lock . | ||
continue-on-error: true | ||
run: cp LazyLLM-Env/poetry.lock . | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
|
@@ -118,21 +91,30 @@ jobs: | |
with: | ||
version: ${{ env.POETRY_VERSION }} | ||
|
||
- name: Add Poetry to PATH | ||
run: | | ||
echo "C:\Users\runneradmin\.local\bin" >> $Env:GITHUB_PATH | ||
- name: Build project with Poetry | ||
run: | | ||
poetry build | ||
continue-on-error: true | ||
- name: List dist directory | ||
run: ls dist | ||
continue-on-error: true | ||
|
||
- name: Install the built package | ||
run: | | ||
$whl_file = Get-ChildItem -Path dist -Filter *.whl | Select-Object -ExpandProperty Name | ||
pip install dist\$whl_file | ||
continue-on-error: true | ||
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 }} | ||
timeout-minutes: 20 | ||
env : | ||
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} |