mirror of
https://github.com/lightbroker/llmsecops-research.git
synced 2026-02-12 14:42:48 +00:00
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: 'Generative AI Guidelines Pre-Production Test'
|
|
|
|
on:
|
|
# Triggers on pull requests and manual workflow dispatch
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
|
|
test-guidelines:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 'checkout'
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
|
|
- name: 'set up Python'
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: 'set up Python dependencies'
|
|
shell: bash
|
|
run: |
|
|
pip install -r ${{ github.workspace }}/requirements.txt
|
|
|
|
- name: 'set up Microsoft Phi-3 Mini 4k LLM from HuggingFace'
|
|
shell: bash
|
|
run: |
|
|
pip install huggingface-hub[cli]
|
|
huggingface-cli download microsoft/Phi-3-mini-4k-instruct-onnx --include cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/* --local-dir ${{ github.workspace }}/infrastructure/foundation_model
|
|
|
|
- name: 'run generative AI guidelines test'
|
|
shell: bash
|
|
run: |
|
|
pytest -k test__generative_ai_guidelines -s --disable-warnings
|
|
|
|
|
|
# for demo purposes
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
needs: [test]
|
|
steps:
|
|
- name: deploy
|
|
shell: bash
|
|
run: |
|
|
echo "placeholder for deployment process"
|