|
18 | 18 | test: |
19 | 19 | name: Python ${{ matrix.python-version }} - ${{ matrix.cdist-group }}/3 |
20 | 20 | runs-on: ubuntu-latest |
21 | | - timeout-minutes: 10 |
| 21 | + timeout-minutes: 15 |
22 | 22 | strategy: |
23 | 23 | fail-fast: false |
24 | 24 | matrix: |
|
42 | 42 | - name: Intall dependencies |
43 | 43 | run: uv sync --frozen --all-extras |
44 | 44 |
|
| 45 | + # Pre-pull docker images with retry to absorb transient registry failures |
| 46 | + # (MCR WAF blocks on mcr.microsoft.com, Docker Hub anonymous rate limits) |
| 47 | + # before pytest starts spawning fixture subprocesses. Pull in parallel |
| 48 | + # (-P 6) - sequential pulls of ~30 images cost 10+ min on a runner. |
| 49 | + - name: Pre-pull docker images |
| 50 | + run: | |
| 51 | + set -u |
| 52 | + images=( |
| 53 | + "mcr.microsoft.com/azure-storage/azurite" |
| 54 | + "mcr.microsoft.com/mssql/server:2022-latest" |
| 55 | + "postgres:11" "postgres:12" "postgres:13" "postgres:14" |
| 56 | + "postgres:15" "postgres:16" "postgres:17" "postgres:18" |
| 57 | + "pgvector/pgvector:pg15" |
| 58 | + "paradedb/paradedb:0.21.5-pg16" |
| 59 | + "google/alloydbomni:16" |
| 60 | + "mysql:5.6" "mysql:5.7" "mysql:8" |
| 61 | + "mariadb:11.3" |
| 62 | + "gvenzl/oracle-free:23-slim-faststart" |
| 63 | + "gvenzl/oracle-xe:18-slim-faststart" |
| 64 | + "redis:latest" |
| 65 | + "valkey/valkey:latest" |
| 66 | + "mongo:latest" |
| 67 | + "cockroachdb/cockroach:latest" |
| 68 | + "software.yugabyte.com/yugabytedb/yugabyte:latest" |
| 69 | + "quay.io/minio/minio" |
| 70 | + "minio/mc:latest" |
| 71 | + "rustfs/rustfs:latest" |
| 72 | + "rustfs/rc:latest" |
| 73 | + "gcr.io/cloud-spanner-emulator/emulator:latest" |
| 74 | + "ghcr.io/goccy/bigquery-emulator:latest" |
| 75 | + "gizmodata/gizmosql:latest" |
| 76 | + "elasticsearch:7.17.19" |
| 77 | + "elasticsearch:8.13.0" |
| 78 | + ) |
| 79 | + printf '%s\n' "${images[@]}" | xargs -n1 -P6 -I{} bash -c ' |
| 80 | + image="$1" |
| 81 | + for attempt in 1 2 3 4 5; do |
| 82 | + if docker pull --quiet "$image"; then |
| 83 | + exit 0 |
| 84 | + fi |
| 85 | + [ "$attempt" -lt 5 ] && sleep $((attempt * attempt * 5)) |
| 86 | + done |
| 87 | + echo "::warning::Failed to pull $image after 5 attempts" |
| 88 | + ' _ {} |
| 89 | +
|
45 | 90 | - if: matrix.python-version == '3.12' |
46 | 91 | name: Run tests with coverage tracking |
47 | 92 | run: uv run pytest --cdist-group=${{ matrix.cdist-group }}/3 -k "not elasticsearch" |
@@ -83,6 +128,18 @@ jobs: |
83 | 128 | - name: Intall dependencies |
84 | 129 | run: uv sync --frozen --all-extras |
85 | 130 |
|
| 131 | + - name: Pre-pull docker images |
| 132 | + run: | |
| 133 | + set -u |
| 134 | + for image in "elasticsearch:7.17.19" "elasticsearch:8.13.0"; do |
| 135 | + for attempt in 1 2 3 4 5; do |
| 136 | + if docker pull --quiet "$image"; then |
| 137 | + break |
| 138 | + fi |
| 139 | + [ "$attempt" -eq 5 ] && echo "::warning::Failed to pull $image" || sleep $((attempt * attempt * 5)) |
| 140 | + done |
| 141 | + done |
| 142 | +
|
86 | 143 | - name: Run tests with coverage tracking |
87 | 144 | run: uv run pytest -k elasticsearch |
88 | 145 |
|
|
0 commit comments