|
| 1 | +name: Factual Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + branches: [main] |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +jobs: |
| 11 | + factual-tests-groq: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + |
| 17 | + - name: Set up Python |
| 18 | + uses: actions/setup-python@v5 |
| 19 | + with: |
| 20 | + python-version: "3.11" |
| 21 | + |
| 22 | + - name: Install dependencies |
| 23 | + run: | |
| 24 | + pip install -e ".[groq]" |
| 25 | + pip install python-dotenv pillow |
| 26 | +
|
| 27 | + - name: Create .env file |
| 28 | + run: | |
| 29 | + echo "TEST_GROQ_TOKEN=${{ secrets.TEST_GROQ_TOKEN }}" >> .env |
| 30 | +
|
| 31 | + - name: Download test image |
| 32 | + run: | |
| 33 | + curl -sL "${{ secrets.TEST_IMAGE_URL }}" -o /tmp/test_image.jpg |
| 34 | +
|
| 35 | + - name: Run Groq factual tests |
| 36 | + run: | |
| 37 | + python -m tests.factual.groq.test_chat |
| 38 | + python -m tests.factual.groq.test_lite /tmp/test_image.jpg |
| 39 | + python -m tests.factual.groq.test_zero /tmp/test_image.jpg |
| 40 | + python -m tests.factual.groq.test_medium /tmp/test_image.jpg |
| 41 | +
|
| 42 | + factual-tests-ollama: |
| 43 | + runs-on: ubuntu-latest |
| 44 | + |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@v4 |
| 47 | + |
| 48 | + - name: Set up Python |
| 49 | + uses: actions/setup-python@v5 |
| 50 | + with: |
| 51 | + python-version: "3.11" |
| 52 | + |
| 53 | + - name: Install dependencies |
| 54 | + run: | |
| 55 | + pip install -e ".[ollama]" |
| 56 | + pip install python-dotenv pillow |
| 57 | +
|
| 58 | + - name: Create .env file |
| 59 | + run: | |
| 60 | + echo "TEST_OLLAMA_URL=${{ secrets.TEST_OLLAMA_URL }}" >> .env |
| 61 | + echo "TEST_OLLAMA_PORT=${{ secrets.TEST_OLLAMA_PORT }}" >> .env |
| 62 | + echo "TEST_OLLAMA_HTTPS=${{ secrets.TEST_OLLAMA_HTTPS }}" >> .env |
| 63 | + echo "TEST_OLLAMA_API_KEY=${{ secrets.TEST_OLLAMA_API_KEY }}" >> .env |
| 64 | +
|
| 65 | + - name: Download test image |
| 66 | + run: | |
| 67 | + curl -sL "${{ secrets.TEST_IMAGE_URL }}" -o /tmp/test_image.jpg |
| 68 | +
|
| 69 | + - name: Run Ollama factual tests |
| 70 | + run: | |
| 71 | + python -m tests.factual.ollama.test_lite /tmp/test_image.jpg |
| 72 | + python -m tests.factual.ollama.test_zero /tmp/test_image.jpg |
| 73 | + python -m tests.factual.ollama.test_medium /tmp/test_image.jpg |
| 74 | + python -m tests.factual.ollama.test_context_chat /tmp/test_image.jpg |
0 commit comments