-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (70 loc) · 2.86 KB
/
run-test-suite.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
name: aep
on:
pull_request:
branches:
- 'main'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
env:
AZURE_VAULT_ID: ${{ secrets.TEST_AZURE_VAULT_ID }}
AZURE_CLIENT_ID: ${{ secrets.TEST_AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.TEST_AZURE_CLIENT_SECRET }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.TEST_AZURE_OPENAI_ENDPOINT }}
AZURE_OPENAI_KEY: ${{ secrets.TEST_AZURE_OPENAI_KEY }}
OPENAI_API_KEY: ${{ secrets.TEST_AZURE_OPENAI_KEY }}
AZURE_CS_ENDPOINT: ${{ secrets.TEST_AZURE_CS_ENDPOINT }}
AZURE_CS_KEY: ${{ secrets.TEST_AZURE_CS_KEY }}
SYSTEM_PROMPT_FILE: "system_prompts/prompts.json"
azure_openai_api_version: "2023-12-01-preview"
SYSTEM_API_KEY: "system"
OPENAI_API_TYPE: "azure"
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: |
pwd
echo "AZURE_VAULT_ID=${AZURE_VAULT_ID}" >> .env
echo "AZURE_CLIENT_ID=${AZURE_CLIENT_ID}" >> .env
echo "AZURE_TENANT_ID=${AZURE_TENANT_ID}" >> .env
echo "AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET}" >> .env
echo "AZURE_OPENAI_ENDPOINT=${AZURE_OPENAI_ENDPOINT}" >> .env
echo "AZURE_OPENAI_KEY=${AZURE_OPENAI_KEY}" >> .env
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" >> .env
echo "AZURE_CS_ENDPOINT=${AZURE_CS_ENDPOINT}" >> .env
echo "AZURE_CS_KEY=${AZURE_CS_KEY}" >> .env
echo "SYSTEM_PROMPT_FILE=${SYSTEM_PROMPT_FILE}" >> .env
echo "azure_openai_api_version=${azure_openai_api_version}" >> .env
echo "SYSTEM_API_KEY=${SYSTEM_API_KEY}" >> .env
echo "OPENAI_API_TYPE=${OPENAI_API_TYPE}" >> .env
make unittest
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@main
with:
# A list of JUnit XML files, directories containing the former, and wildcard
# patterns to process.
# See @actions/glob for supported patterns.
path: src/test-results.xml
# (Optional) Add a summary of the results at the top of the report
summary: true
# (Optional) Select which results should be included in the report.
# Follows the same syntax as `pytest -r`
display-options: fEX
# (Optional) Fail the workflow if no JUnit XML was found.
fail-on-empty: false
# (Optional) Title of the test results section in the workflow summary
title: AEP Test Results
env:
CI: true