Skip to content

Commit

Permalink
Sanity test for pip install from repository
Browse files Browse the repository at this point in the history
Between releases the various installation processes need
testing, this add a basic integration test for early warning.

Signed-off-by: Jeffrey Martin <[email protected]>
  • Loading branch information
jmartin-tech committed Nov 12, 2024
1 parent 5eb8ea1 commit 36b3218
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/remote_package_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Garak pip - install from repo

on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10","3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: pip install from repo
run: |
python -m pip install --upgrade pip
python -m pip install -U git+https://github.com/${GITHUB_REPOSITORY}.git@${GITHUB_SHA}
- name: Sanity Test
run: |
python -m garak --model_type test.Blank --probes test.Test
set +e
grep ERROR $HOME/.local/share/garak/garak.log
if [ $? != 1 ]; then
echo "Errors exist in the test log"
exit 1
fi

0 comments on commit 36b3218

Please sign in to comment.