Skip to content

Commit 95718e5

Browse files
committed
add ci
1 parent 091587b commit 95718e5

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/publish.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Python Package for llama_cpp_openai
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
release:
9+
types: [created]
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
python-version: [3.8, 3.9, 3.10, 3.11]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
pip install --upgrade pip
29+
pip install poetry
30+
- name: Test with Poetry
31+
run: |
32+
poetry install
33+
poetry run pytest
34+
- name: Build and publish to PyPI
35+
if: github.event_name == 'release'
36+
run: |
37+
poetry build
38+
poetry publish --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }}
39+
env:
40+
PYPI_USERNAME: __token__
41+
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*/__pycache__
22
**/.DS_Store
33
.cache
4+
dist/

0 commit comments

Comments
 (0)