Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Switch python tests to use public release image #1649

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build svix server image
run: docker compose build
- name: Pull svix server image (and dependencies)
run: docker compose pull
svix-jplatte marked this conversation as resolved.
Show resolved Hide resolved
working-directory: ./server

- uses: actions/setup-python@v5
Expand Down
7 changes: 7 additions & 0 deletions python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,20 @@ def docker_compose_command():
# fallback on v1 otherwise
return "docker-compose"

# `pytest-docker` reads this to override the location of the docker-compose.yml file
@pytest.fixture(scope="session")
def docker_compose_file():
return [
os.path.join(os.path.dirname(__file__), "../../server/docker-compose.yml"),
os.path.join(os.path.dirname(__file__), "docker-compose.override.yml"),
]

# `pytest-docker` will use this fixture to override the setup command
@pytest.fixture(scope="session")
def docker_setup():
# Don't include the default --build option in the setup
return ["up -d"]

@pytest.fixture(scope="session")
def docker_compose(docker_services):
return docker_services._docker_compose
Expand Down