forked from LazyAGI/LazyLLM
-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (103 loc) · 3.43 KB
/
poetry_install.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Build and Test on macOS and Windows
on:
push:
paths:
- 'pyproject2.toml'
- '.github/**'
pull_request:
paths:
- 'pyproject2.toml'
- '.github/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
POETRY_VERSION: "1.8.3"
jobs:
macos-build-test:
runs-on: macOS-latest
strategy:
matrix:
python-version: ['3.10', 3.11, 3.12]
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Copy poetry.lock to root directory
run: cp LazyLLM-Env/poetry.lock .
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.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: Run tests
# run: python -m pytest -v tests/basic_tests/
# if: matrix.python-version == '3.10'
- name: charge_tests
run : |
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 --ignore=tests/charge_tests/test_engine.py 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
- name: basic_tests
run : |
pip install -r tests/requirements.txt
export LAZYLLM_DATA_PATH=/tmp/lazyllm/data
python -m pytest -v -s tests/basic_tests/
timeout-minutes: 20
windows-build-test:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.10', 3.11, 3.12]
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Copy poetry.lock to root directory
run: Copy-Item LazyLLM-Env/poetry.lock .
continue-on-error: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
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