Prompt Validation Tests #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Prompt Validation Tests | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Runs daily at midnight UTC | |
workflow_dispatch: # Allows manual trigger of the workflow | |
push: | |
paths: | |
- 'tests/config.json' | |
- 'tests/prompts_test.py' | |
- 'tests/testcases.csv' | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
environment: dev | |
env: | |
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run prompt validation tests | |
run: | | |
mkdir -p tests_results | |
timestamp=$(date +"%Y-%m-%d-%H-%M-%S") | |
python -m unittest discover -s ./tests -p '*_test.py' | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tests-results | |
path: tests_results/*.csv |