Skip to content

LMQL 0.7.3

LMQL 0.7.3 #25

Workflow file for this run

name: Run Tests and Publish Wheel
on:
# on release publish
release:
types: [released]
jobs:
test-without-hf-transformers:
runs-on: lmql-ci
steps:
- uses: actions/checkout@v3
- name: Setup Fresh Virtual Environment
run: |
pip install --upgrade pip
python3.10 -m venv env
export PATH=$PATH:/home/docker/.local/bin
source env/bin/activate
echo "VIRTUAL ENV:" $VIRTUAL_ENV
- name: Install Dependencies
run: source env/bin/activate && pip install -e . && pip install langchain
- name: Greet
env:
OPENAI_API_KEY: ${{ secrets.LMQL_CI_OPENAI_KEY }}
run: source env/bin/activate && python -m lmql.cli hello openai
test-with-hf-transformers:
runs-on: lmql-ci
needs: [test-without-hf-transformers]
steps:
- uses: actions/checkout@v3
- name: Setup Fresh Virtual Environment
run: |
pip install --upgrade pip
python3.10 -m venv env
export PATH=$PATH:/home/docker/.local/bin
source env/bin/activate
echo "VIRTUAL ENV:" $VIRTUAL_ENV
- name: Install Dependencies
run: source env/bin/activate && pip install -e '.[hf,tests]' && pip install langchain
- name: Run Tests
env:
OPENAI_API_KEY: ${{ secrets.LMQL_CI_OPENAI_KEY }}
run: source env/bin/activate && python src/lmql/tests/all.py --failearly
publish:
runs-on: lmql-ci
needs: [test-with-hf-transformers, test-without-hf-transformers]
steps:
- uses: actions/checkout@v3
- name: Setup Fresh Virtual Environment
run: |
pip install --upgrade pip
python3.10 -m venv env
export PATH=$PATH:/home/docker/.local/bin
source env/bin/activate
echo "VIRTUAL ENV:" $VIRTUAL_ENV
- name: Install Packaging Dependencies
run: pip install build twine
- name: Package
env:
VERSION: ${{ github.ref }}
run: bash scripts/wheel.sh $(echo $VERSION | sed 's/^refs\/tags\/v//')
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
VERSION: ${{ github.ref }}
run: bash scripts/pypi-release.sh lmql-$(echo $VERSION | sed 's/^refs\/tags\/v//') --production