Add tests for token escaper class (#69) #183
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: Test Suite | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Test on ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, '3.10', 3.11] | |
services: | |
redis: | |
image: redis/redis-stack-server:latest | |
ports: | |
- 6379:6379 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[dev,all] | |
- name: Start Redis | |
run: | | |
REDIS_URL=redis://localhost:6379 | |
echo REDIS_URL=$REDIS_URL >> $GITHUB_ENV | |
- name: Authenticate to Google Cloud | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }} | |
- name: Run tests | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_KEY }} | |
GCP_LOCATION: ${{ secrets.GCP_LOCATION }} | |
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | |
run: | | |
make test-cov | |
- name: Run notebooks | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_KEY }} | |
GCP_LOCATION: ${{ secrets.GCP_LOCATION }} | |
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | |
run: | | |
cd docs/ && treon -v --exclude="./examples/openai_qna.ipynb" | |
- name: Publish coverage results | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |