Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
lwj-st committed Sep 23, 2024
1 parent 860bb27 commit 1b77dbf
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions .github/workflows/poetry_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- 'pyproject2.toml'
- '.github/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
POETRY_VERSION: "1.8.3"

Expand All @@ -22,48 +26,38 @@ jobs:
python-version: ['3.10', 3.11, 3.12]

steps:
# 检出代码仓库
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

# 复制 poetry.lock 文件到根目录
- name: Copy poetry.lock to root directory
run: cp LazyLLM-Env/poetry.lock .

# 设置 Python 版本
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

# 安装 Poetry
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}

# # 安装依赖
# - name: Install dependencies
# run: poetry install

# 构建项目
- name: Build project with Poetry
run: |
poetry build
continue-on-error: true
# 查看构建文件
- name: List dist directory
run: ls dist
continue-on-error: true

# 安装生成的 wheel 文件
- name: Install the built package
run: |
pip install dist/lazyllm*.whl
continue-on-error: true
- name: Run tests
run: python -m pytest -v tests/basic_tests/
if: matrix.python-version == '3.10'

windows-build-test:
runs-on: windows-latest
Expand All @@ -73,49 +67,39 @@ jobs:
python-version: ['3.10', 3.11, 3.12]

steps:
# 检出代码仓库
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

# 复制 poetry.lock 文件到根目录
- name: Copy poetry.lock to root directory
run: Copy-Item LazyLLM-Env/poetry.lock .
continue-on-error: true

# 设置 Python 版本
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

# 安装 Poetry
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}

# # 安装依赖
# - name: Install dependencies
# run: poetry install

- 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

# 安装生成的 wheel 文件
- name: Install the built package
run: |
$whl_file = Get-ChildItem -Path dist -Filter *.whl | Select-Object -ExpandProperty Name
Expand Down

0 comments on commit 1b77dbf

Please sign in to comment.