Skip to content

Commit 428845a

Browse files
committed
Clean up the workflow
1 parent 80b27c3 commit 428845a

1 file changed

Lines changed: 14 additions & 16 deletions

File tree

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test GitHub Models
1+
name: Test example files are working with GitHub models
22

33
on:
44
push:
@@ -8,7 +8,6 @@ on:
88
# Also run when chat.py files are modified
99
paths:
1010
- 'chat.py'
11-
- 'reasoning.py'
1211
- 'spanish/chat.py'
1312
- 'requirements.txt'
1413
- '.github/workflows/test-github-models.yaml'
@@ -18,34 +17,33 @@ jobs:
1817
runs-on: ubuntu-latest
1918
permissions:
2019
contents: read
20+
strategy:
21+
matrix:
22+
python_file:
23+
- "chat.py"
24+
- "spanish/chat.py"
2125

2226
steps:
2327
- uses: actions/checkout@v5
2428

2529
- name: Set up Python 3.11
2630
uses: actions/setup-python@v5
2731
with:
28-
python-version: "3.11"
32+
python-version-file: "pyproject.toml"
33+
34+
- name: Install uv
35+
uses: astral-sh/setup-uv@v6
2936

3037
- name: Install dependencies
3138
run: |
32-
python -m pip install --upgrade pip
33-
pip install -r requirements.txt
34-
35-
- name: Test main chat.py with GitHub Models
39+
uv pip install -r requirements.txt
3640
env:
37-
API_HOST: github
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
GITHUB_MODEL: openai/gpt-4o-mini
40-
run: |
41-
echo "Testing main chat.py file..."
42-
python chat.py
41+
UV_SYSTEM_PYTHON: 1
4342

44-
- name: Test Spanish chat.py with GitHub Models
43+
- name: Test ${{ matrix.python_file }} with GitHub Models
4544
env:
4645
API_HOST: github
4746
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4847
GITHUB_MODEL: openai/gpt-4o-mini
4948
run: |
50-
echo "Testing Spanish chat.py file..."
51-
python spanish/chat.py
49+
python ${{ matrix.python_file }}

0 commit comments

Comments
 (0)