Skip to content

Commit 36b3218

Browse files
committed
Sanity test for pip install from repository
Between releases the various installation processes need testing, this add a basic integration test for early warning. Signed-off-by: Jeffrey Martin <[email protected]>
1 parent 5eb8ea1 commit 36b3218

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Garak pip - install from repo
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["3.10","3.12"]
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: pip install from repo
23+
run: |
24+
python -m pip install --upgrade pip
25+
python -m pip install -U git+https://github.com/${GITHUB_REPOSITORY}.git@${GITHUB_SHA}
26+
- name: Sanity Test
27+
run: |
28+
python -m garak --model_type test.Blank --probes test.Test
29+
set +e
30+
grep ERROR $HOME/.local/share/garak/garak.log
31+
if [ $? != 1 ]; then
32+
echo "Errors exist in the test log"
33+
exit 1
34+
fi

0 commit comments

Comments
 (0)