|
16 | 16 | name: "🧪 Unit Tests: Webapp" |
17 | 17 | runs-on: ubuntu-latest |
18 | 18 | strategy: |
| 19 | + # one flaky shard shouldn't cancel its siblings - lets us re-run only the failed shard |
| 20 | + fail-fast: false |
19 | 21 | matrix: |
20 | | - shardIndex: [1, 2, 3, 4, 5, 6, 7, 8] |
21 | | - shardTotal: [8] |
| 22 | + shardIndex: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] |
| 23 | + shardTotal: [10] |
22 | 24 | env: |
23 | 25 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} |
24 | 26 | SHARD_INDEX: ${{ matrix.shardIndex }} |
|
53 | 55 | - name: ⬇️ Checkout repo |
54 | 56 | uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
55 | 57 | with: |
56 | | - fetch-depth: 0 |
| 58 | + fetch-depth: 1 |
57 | 59 | persist-credentials: false |
58 | 60 |
|
59 | 61 | - name: ⎔ Setup pnpm |
@@ -81,12 +83,23 @@ jobs: |
81 | 83 | - name: 🐳 Pre-pull testcontainer images |
82 | 84 | if: ${{ env.DOCKERHUB_USERNAME }} |
83 | 85 | run: | |
| 86 | + # Retry each pull - DockerHub registry timeouts are a recurring transient CI flake. |
| 87 | + pull() { |
| 88 | + for attempt in 1 2 3; do |
| 89 | + docker pull "$1" && return 0 |
| 90 | + echo "::warning::docker pull $1 failed (attempt ${attempt}/3); retrying in 10s" |
| 91 | + sleep 10 |
| 92 | + done |
| 93 | + echo "::error::docker pull $1 failed after 3 attempts" |
| 94 | + return 1 |
| 95 | + } |
84 | 96 | echo "Pre-pulling Docker images with authenticated session..." |
85 | | - docker pull postgres:14 |
86 | | - docker pull clickhouse/clickhouse-server:25.4-alpine |
87 | | - docker pull redis:7-alpine |
88 | | - docker pull testcontainers/ryuk:0.11.0 |
89 | | - docker pull electricsql/electric:1.2.4 |
| 97 | + pull postgres:14 |
| 98 | + pull clickhouse/clickhouse-server:25.4-alpine |
| 99 | + pull redis:7.2 |
| 100 | + pull testcontainers/ryuk:0.14.0 |
| 101 | + pull electricsql/electric:1.2.4 |
| 102 | + pull minio/minio:latest |
90 | 103 | echo "Image pre-pull complete" |
91 | 104 |
|
92 | 105 | - name: 📥 Download deps |
@@ -131,7 +144,7 @@ jobs: |
131 | 144 | - name: ⬇️ Checkout repo |
132 | 145 | uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
133 | 146 | with: |
134 | | - fetch-depth: 0 |
| 147 | + fetch-depth: 1 |
135 | 148 | persist-credentials: false |
136 | 149 |
|
137 | 150 | - name: ⎔ Setup pnpm |
|
0 commit comments