Skip to content

Commit 94b5b34

Browse files
committed
Extract promptfoo ci job
1 parent 98c4024 commit 94b5b34

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020

21-
- name: Set up Node.js
22-
uses: actions/setup-node@v4
23-
with:
24-
node-version: '20'
25-
26-
- name: Install promptfoo
27-
run: npm install -g promptfoo
28-
2921
- name: Set up Python ${{ matrix.python-version }}
3022
uses: actions/setup-python@v4
3123
with:
@@ -44,16 +36,30 @@ jobs:
4436
run: |
4537
uv run pytest --cov=src/isnt_that_odd --cov-report=xml
4638
47-
- name: Run promptfoo tests
48-
run: |
49-
promptfoo eval --config promptfoo.yaml
50-
5139
- name: Upload coverage to Codecov
5240
uses: codecov/codecov-action@v3
5341
with:
5442
file: ./coverage.xml
5543
fail_ci_if_error: false
5644

45+
promptfoo:
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- name: Set up Node.js
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: '20'
55+
56+
- name: Install promptfoo
57+
run: npm install -g promptfoo
58+
59+
- name: Run promptfoo tests
60+
run: |
61+
promptfoo eval --config promptfoo.yaml
62+
5763
lint:
5864
runs-on: ubuntu-latest
5965

@@ -89,7 +95,7 @@ jobs:
8995
9096
build:
9197
runs-on: ubuntu-latest
92-
needs: [test, lint]
98+
needs: [test, promptfoo, lint]
9399

94100
steps:
95101
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)