Ahh/new error format #764
Workflow file for this run
This file contains hidden or 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: CI Tests | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- main | |
permissions: read-all | |
jobs: | |
run-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: | |
- "3.11" | |
name: Test | |
runs-on: ${{ matrix.os }} | |
env: | |
PYTHONPATH: "." | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }} | |
JUDGMENT_DEV: true | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install pipenv | |
pipenv install --dev | |
- name: Run tests | |
run: | | |
cd src | |
pipenv run pytest tests | |
run-e2e-tests: | |
if: "!contains(github.actor, '[bot]')" # Exclude if the actor is a bot | |
name: E2E Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Wait for turn | |
uses: softprops/turnstyle@v2 | |
with: | |
poll-interval-seconds: 10 | |
same-branch-only: false | |
job-to-wait-for: "E2E Tests" | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-west-1 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install judgeval dependencies | |
run: | | |
pip install pipenv | |
pipenv install --dev | |
- name: Check if server is running | |
run: | | |
if ! curl -s http://api.judgmentlabs.ai/health > /dev/null; then | |
echo "Production Judgment server is not running properly. Check logs on AWS CloudWatch for more details." | |
exit 1 | |
else | |
echo "Server is running." | |
fi | |
- name: Run E2E tests | |
working-directory: src | |
run: | | |
SECRET_VARS=$(aws secretsmanager get-secret-value --secret-id gh-actions/api-keys/judgeval --query SecretString --output text) | |
export $(echo "$SECRET_VARS" | jq -r 'to_entries | .[] | "\(.key)=\(.value)"') | |
pipenv run pytest --durations=0 ./e2etests |