Skip to content

Run online tests

Run online tests #7

Workflow file for this run

name: Run online tests
on: workflow_dispatch
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
# Install poetry with virtualenvs disabled for tests
- name: Install poetry and dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
cd src
poetry config virtualenvs.create false
poetry install
# en_core_web_sm required by spacy needs to be installed separately
- name: Install extra dependencies
run: |
cd src
poetry run python -m spacy download en_core_web_sm
- name: Run tests
env:
SLACK_SIGNING_SECRET: ${{ secrets.SLACKSIGNINGSECRET }}
SLACK_OAUTH_TOKEN: ${{ secrets.SLACKOAUTHTOKEN }}
SLACK_VERIFICATION_TOKEN: ${{ secrets.SLACKVERIFICATIONTOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAIKEY }}
PINECONE_INDEX: ${{ secrets.PINCONEID }}
PINECONE_ENV: ${{ secrets.PINECONEENV }}
SLACK_PORT: ${{ secrets.SLACKPORT }}
SERPER_API_KEY: ${{ secrets.SERPAAPIKEY }}
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUBOATHKEY }}
DAILY_TOKEN_LIMIT: ${{ secrets.TOKENLIMIT }}
TEMPRATURE: ${{ secrets.TEMPRATURE }}
run: |
cd src
poetry run pytest --external_api --cov=sherpa_ai tests