Skip to content

Commit cb9e0ce

Browse files
authored
ci: Only test on compose 2.26 w/ customizations (#3506)
Docker Compose is much more robust nowadays compared to the past where we had to maintain tests for both v1 and v2 and then a specific version of v2. Hence, we are removing tests for the older versions of Docker Compose with this patch. We also remove the separate tests for customizations and w/o customizations as the one with customizations should cover the one without them anyway. This reduces the CI workload to 25% of what it was
1 parent 8c1653d commit cb9e0ce

File tree

1 file changed

+9
-21
lines changed

1 file changed

+9
-21
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,8 @@ jobs:
141141
integration-test:
142142
if: github.repository_owner == 'getsentry'
143143
runs-on: ubuntu-22.04
144-
name: integration test ${{ matrix.compose_version }} - customizations ${{ matrix.customizations }}
145-
strategy:
146-
fail-fast: false
147-
matrix:
148-
customizations: ["disabled", "enabled"]
149-
compose_version: ["v2.19.0", "v2.26.0"]
150-
include:
151-
- compose_version: "v2.19.0"
152-
compose_path: "/usr/local/lib/docker/cli-plugins"
153-
- compose_version: "v2.26.0"
154-
compose_path: "/usr/local/lib/docker/cli-plugins"
144+
name: integration test
155145
env:
156-
COMPOSE_PROJECT_NAME: self-hosted-${{ strategy.job-index }}
157146
REPORT_SELF_HOSTED_ISSUES: 0
158147
SELF_HOSTED_TESTING_DSN: ${{ vars.SELF_HOSTED_TESTING_DSN }}
159148
steps:
@@ -177,16 +166,19 @@ jobs:
177166
fi
178167
179168
- name: Get Compose
169+
env:
170+
COMPOSE_PATH: /usr/local/lib/docker/cli-plugins
171+
COMPOSE_VERSION: 'v2.26.0'
180172
run: |
181173
# Always remove `docker compose` support as that's the newer version
182174
# and comes installed by default nowadays.
183175
sudo rm -f "/usr/local/lib/docker/cli-plugins/docker-compose"
184176
# Docker Compose v1 is installed here, remove it
185177
sudo rm -f "/usr/local/bin/docker-compose"
186-
sudo rm -f "${{ matrix.compose_path }}/docker-compose"
187-
sudo mkdir -p "${{ matrix.compose_path }}"
188-
sudo curl -L https://github.com/docker/compose/releases/download/${{ matrix.compose_version }}/docker-compose-`uname -s`-`uname -m` -o "${{ matrix.compose_path }}/docker-compose"
189-
sudo chmod +x "${{ matrix.compose_path }}/docker-compose"
178+
sudo rm -f "${{ env.COMPOSE_PATH }}/docker-compose"
179+
sudo mkdir -p "${{ env.COMPOSE_PATH }}"
180+
sudo curl -L https://github.com/docker/compose/releases/download/${{ env.COMPOSE_VERSION }}/docker-compose-`uname -s`-`uname -m` -o "${{ env.COMPOSE_PATH }}/docker-compose"
181+
sudo chmod +x "${{ env.COMPOSE_PATH }}/docker-compose"
190182
191183
- name: Prepare Docker Volume Caching
192184
id: cache_key
@@ -243,11 +235,7 @@ jobs:
243235
- name: Integration Test
244236
run: |
245237
docker compose up --wait
246-
if [ "${{ matrix.compose_version }}" = "v2.19.0" ]; then
247-
pytest --reruns 3 --cov --junitxml=junit.xml _integration-test/ --customizations=${{ matrix.customizations }}
248-
else
249-
pytest --cov --junitxml=junit.xml _integration-test/ --customizations=${{ matrix.customizations }}
250-
fi
238+
pytest --cov --junitxml=junit.xml _integration-test/ --customizations=enabled
251239
252240
- name: Inspect failure
253241
if: failure()

0 commit comments

Comments
 (0)