Skip to content

Commit 5f2649f

Browse files
committed
Update workflow to test API models, use manual trigger
1 parent 778cd10 commit 5f2649f

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/tests_nightly.yml renamed to .github/workflows/tests_api_models.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
name: Nightly Tests
1+
name: API Model Tests
22

3-
# Run every day at 6:00 AM UTC
43
on:
5-
schedule:
6-
- cron: "0 6 * * *"
4+
workflow_dispatch:
5+
inputs:
6+
branch_name:
7+
description: 'Name of the branch to test'
8+
required: true
9+
type: string
710

811
jobs:
912
tests:
10-
name: Run the tests
13+
name: Run API Model Tests
1114
runs-on: ubuntu-latest
1215
env:
1316
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -21,21 +24,27 @@ jobs:
2124

2225
steps:
2326
- uses: actions/checkout@v3
27+
with:
28+
ref: ${{ github.event.inputs.branch_name }}
29+
2430
- name: Set up Python ${{ matrix.python-version }}
2531
uses: actions/setup-python@v4
2632
with:
2733
python-version: ${{ matrix.python-version }}
34+
2835
- name: Install Ollama
2936
run: |
3037
curl -fsSL https://ollama.com/install.sh | sh
3138
ollama --version
3239
ollama pull tinyllama
40+
3341
- name: Set up test environment
3442
run: |
3543
python -m pip install --upgrade pip
3644
pip install uv
3745
uv venv
3846
uv pip install -e .[test]
47+
3948
- name: Create matrix id
4049
id: matrix-id
4150
env:
@@ -45,6 +54,7 @@ jobs:
4554
export MATRIX_ID=`echo $MATRIX_CONTEXT | md5sum | cut -c 1-32`
4655
echo $MATRIX_ID
4756
echo "::set-output name=id::$MATRIX_ID"
57+
4858
- name: Run tests
4959
run: |
5060
uv run pytest -x --cov=outlines -m 'api_call' --ignore=tests/models/test_dottxt.py

0 commit comments

Comments
 (0)