-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #289 from eth-sri/changed-ci
Different Test Levels
- Loading branch information
Showing
35 changed files
with
657 additions
and
385 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Run Optional Tests | ||
|
||
# optional tests only run manually | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
optional-tests: | ||
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 | ||
# cache dependencies | ||
- name: Cache dependencies | ||
id: cache | ||
uses: corca-ai/local-cache@v2 | ||
with: | ||
path: env/lib/python3.10/site-packages | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.cfg') }} | ||
base: "/home/docker/.cache/" | ||
- name: Install Dependencies | ||
run: source env/bin/activate && pip install -e '.[hf,hf-accel,tests,llama]' && pip install langchain | ||
- name: Run Optional Tests | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.LMQL_CI_OPENAI_KEY }} | ||
run: source env/bin/activate && python src/lmql/tests/all.py only optional openai langchain --failearly |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Test and Publish New Release | ||
|
||
on: | ||
# on release publish | ||
release: | ||
types: [released] | ||
|
||
|
||
jobs: | ||
tests: | ||
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 | ||
# cache dependencies | ||
- name: Cache dependencies | ||
id: cache | ||
uses: corca-ai/local-cache@v2 | ||
with: | ||
path: env | ||
key: ${{ runner.os }}-env-${{ hashFiles('**/setup.cfg') }} | ||
base: "/home/docker/.cache/" | ||
- name: Install Dependencies | ||
run: source env/bin/activate && pip install -e '.[hf,hf-accel,tests,llama]' | ||
- name: Run Default Tests | ||
run: source env/bin/activate && python src/lmql/tests/all.py --failearly | ||
optional-tests: | ||
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 | ||
# cache dependencies | ||
- name: Cache dependencies | ||
id: cache | ||
uses: corca-ai/local-cache@v2 | ||
with: | ||
path: env/lib/python3.10/site-packages | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.cfg') }} | ||
base: "/home/docker/.cache/" | ||
- name: Install Dependencies | ||
run: source env/bin/activate && pip install -e '.[hf,hf-accel,tests,llama]' && pip install langchain | ||
- name: Run Optional Tests | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.LMQL_CI_OPENAI_KEY }} | ||
run: source env/bin/activate && python src/lmql/tests/all.py only optional openai langchain --failearly | ||
publish: | ||
runs-on: lmql-ci | ||
needs: [tests, optional-tests] | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Test Release to test.pypi.org | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to publish' | ||
required: true | ||
|
||
|
||
jobs: | ||
tests: | ||
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 | ||
# cache dependencies | ||
- name: Cache dependencies | ||
id: cache | ||
uses: corca-ai/local-cache@v2 | ||
with: | ||
path: env | ||
key: ${{ runner.os }}-env-${{ hashFiles('**/setup.cfg') }} | ||
base: "/home/docker/.cache/" | ||
- name: Install Dependencies | ||
run: source env/bin/activate && pip install -e '.[hf,hf-accel,tests,llama]' | ||
- name: Run Default Tests | ||
run: source env/bin/activate && python src/lmql/tests/all.py --failearly | ||
optional-tests: | ||
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 | ||
# cache dependencies | ||
- name: Cache dependencies | ||
id: cache | ||
uses: corca-ai/local-cache@v2 | ||
with: | ||
path: env/lib/python3.10/site-packages | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.cfg') }} | ||
base: "/home/docker/.cache/" | ||
- name: Install Dependencies | ||
run: source env/bin/activate && pip install -e '.[hf,hf-accel,tests,llama]' && pip install langchain | ||
- name: Run Optional Tests | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.LMQL_CI_OPENAI_KEY }} | ||
run: source env/bin/activate && python src/lmql/tests/all.py only optional openai langchain --failearly | ||
publish: | ||
runs-on: lmql-ci | ||
needs: [tests, optional-tests] | ||
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.event.inputs.version }} | ||
run: bash scripts/wheel.sh $(echo $VERSION | sed 's/^refs\/tags\/v//') | ||
- name: Publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} | ||
VERSION: ${{ github.event.inputs.version }} | ||
run: bash scripts/pypi-release.sh lmql-$(echo $VERSION | sed 's/^refs\/tags\/v//') |
Oops, something went wrong.