Add imag gitkeep #16
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: Python Tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
env: | |
POETRY_HTTP_CONCURRENCY: 1 # Forces single-threaded downloads | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y poppler-utils tesseract-ocr libtesseract-dev libmagic-dev | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.11.9' | |
- name: Install Poetry | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry==1.8.5 | |
- name: Configure Poetry | |
run: poetry config virtualenvs.in-project true | |
# - name: Cache Poetry download cache | |
# uses: actions/cache@v3 | |
# with: | |
# path: ~/.cache/pypoetry | |
# key: ${{ runner.os }}-poetry-cache-${{ hashFiles('poetry.lock') }} | |
# restore-keys: | | |
# ${{ runner.os }}-poetry-cache- | |
# - name: Cache virtual environment | |
# uses: actions/cache@v3 | |
# with: | |
# path: .venv | |
# key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }} | |
# restore-keys: | | |
# ${{ runner.os }}-venv- | |
- name: Install dependencies | |
run: poetry install --all-extras | |
- name: Set environment variables | |
run: echo "OPENAI_API_KEY=test_api_key" >> $GITHUB_ENV | |
- name: Run tests | |
run: poetry run pytest --maxfail=10 --disable-warnings -v --ignore self_serve_platform/tests/integration |