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

Bump docker compose version in CI #2980

Merged
merged 4 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
11 changes: 8 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ jobs:
fail-fast: false
matrix:
customizations: ["disabled", "enabled"]
compose_version: ["v2.0.1", "v2.7.0"]
compose_version: ["v2.0.1", "v2.26.0"]
include:
- compose_version: "v2.0.1"
compose_path: "/usr/local/lib/docker/cli-plugins"
- compose_version: "v2.7.0"
- compose_version: "v2.26.0"
compose_path: "/usr/local/lib/docker/cli-plugins"
env:
COMPOSE_PROJECT_NAME: self-hosted-${{ strategy.job-index }}
Expand Down Expand Up @@ -110,7 +110,12 @@ jobs:
command: ./install.sh

- name: Integration Test
run: pytest --cov --junitxml=junit.xml --reruns 3 _integration-test/ --customizations=${{ matrix.customizations }}
run: |
if [ "${{ matrix.compose_version }}" = "v2.0.1" ]; then
pytest --reruns 5 --cov --junitxml=junit.xml _integration-test/ --customizations=${{ matrix.customizations }}
hubertdeng123 marked this conversation as resolved.
Show resolved Hide resolved
else
pytest --cov --junitxml=junit.xml _integration-test/ --customizations=${{ matrix.customizations }}
fi

- name: Inspect failure
if: failure()
Expand Down
8 changes: 6 additions & 2 deletions _integration-test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ def pytest_addoption(parser):

@pytest.fixture(scope="session", autouse=True)
def configure_self_hosted_environment(request):
subprocess.run(["docker", "compose", "--ansi", "never", "up", "-d"], check=True)
subprocess.run(
["docker", "compose", "--ansi", "never", "up", "-d"],
check=True,
capture_output=True,
)
for i in range(TIMEOUT_SECONDS):
try:
response = httpx.get(SENTRY_TEST_HOST, follow_redirects=True)
except httpx.NetworkError:
except httpx.RequestError:
time.sleep(1)
else:
if response.status_code == 200:
Expand Down
6 changes: 5 additions & 1 deletion _integration-test/test_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ def test_import(setup_backup_restore_env_variables):
["docker", "compose", "--ansi", "never", "run", "web", "upgrade", "--noinput"],
check=True,
)
subprocess.run(["docker", "compose", "--ansi", "never", "up", "-d"], check=True)
subprocess.run(
["docker", "compose", "--ansi", "never", "up", "-d"],
check=True,
capture_output=True,
)
sentry_admin_sh = os.path.join(os.getcwd(), "sentry-admin.sh")
subprocess.run(
[
Expand Down
Loading