feat: e2e test workflow for gorgias #7
Workflow file for this run
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: Pytest bizon | |
on: | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
container: python:3.10 | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: bizon | |
POSTGRES_DB: bizon_test | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd "pg_isready -U postgres -d bizon_test" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Poetry | |
run: | | |
pip install poetry | |
- name: Configure Poetry for CI | |
run: | | |
poetry config virtualenvs.create false | |
- name: Install dependencies | |
run: | | |
poetry install --with test --all-extras | |
- name: Run tests | |
run: | | |
POETRY_ENV_TEST=CI poetry run pytest tests/ | |
env: | |
# The hostname used to communicate with the PostgreSQL service container | |
POSTGRES_HOST: postgres | |
# The default PostgreSQL port | |
POSTGRES_PORT: 5432 |