Skip to content

add poetry install

add poetry install #4

Workflow file for this run

name: Build and Test on macOS and Windows
on:
push:
branches:
- main
- lwj/poetry_install
pull_request:
branches:
- main
env:
POETRY_VERSION: "1.8.3"
jobs:
build-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, windows-latest]
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: |
if [ ${{ runner.os }} == 'Windows' ]; then Copy-Item LazyLLM-Env/poetry.lock .; else cp LazyLLM-Env/poetry.lock .; fi
# 设置 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