77name : " wallet-sdk ci"
88
99env :
10- GO_VERSION : ' 1.23.4 '
10+ GO_VERSION : ' 1.25.1 '
1111
1212on :
1313 push :
9797 - name : Build docker images for test server
9898 run : |
9999 docker build -f ./images/mocks/loginconsent/Dockerfile --no-cache -t wallet-sdk/mock-login-consent:latest \
100- --build-arg GO_VER=1.23 \
101- --build-arg ALPINE_VER=3.20 .
100+ --build-arg GO_VER=1.25 \
101+ --build-arg ALPINE_VER=3.22 .
102102 - name : Save docker image as tar
103103 run : |
104104 docker save --output /tmp/mock-login-consent.tar wallet-sdk/mock-login-consent
@@ -120,8 +120,8 @@ jobs:
120120 - name : Build docker images for test server
121121 run : |
122122 docker build -f ./images/mocks/webhook/Dockerfile --no-cache -t wallet-sdk/sample-webhook:latest \
123- --build-arg GO_VER=1.23 \
124- --build-arg ALPINE_VER=3.20 .
123+ --build-arg GO_VER=1.25 \
124+ --build-arg ALPINE_VER=3.22 .
125125 - name : Save docker image as tar
126126 run : |
127127 docker save --output /tmp/mock-sample-webhook.tar wallet-sdk/sample-webhook
@@ -143,8 +143,8 @@ jobs:
143143 - name : Build docker images for test server
144144 run : |
145145 docker build -f ./images/mocks/trustregistry/Dockerfile --no-cache -t wallet-sdk/mock-trust-registry:latest \
146- --build-arg GO_VER=1.23 \
147- --build-arg ALPINE_VER=3.20 .
146+ --build-arg GO_VER=1.25 \
147+ --build-arg ALPINE_VER=3.22 .
148148 - name : Save docker image as tar
149149 run : |
150150 docker save --output /tmp/mock-trust-registry.tar wallet-sdk/mock-trust-registry
@@ -166,8 +166,8 @@ jobs:
166166 - name : Build docker images for test server
167167 run : |
168168 docker build -f ./images/mocks/attestation/Dockerfile --no-cache -t wallet-sdk/mock-attestation:latest \
169- --build-arg GO_VER=1.23 \
170- --build-arg ALPINE_VER=3.20 .
169+ --build-arg GO_VER=1.25 \
170+ --build-arg ALPINE_VER=3.22 .
171171 - name : Save docker image as tar
172172 run : |
173173 docker save --output /tmp/mock-attestation.tar wallet-sdk/mock-attestation
@@ -178,7 +178,7 @@ jobs:
178178 path : /tmp/mock-attestation.tar
179179
180180 iOSFlutterIntegrationTest :
181- runs-on : macos-13
181+ runs-on : macos-15
182182 needs : [ BuildMockLoginConsentServer, BuilMockTrustRegistryServer, BuilMockAttestationServer, BuildMockSampleWebhookServer ]
183183 timeout-minutes : 60
184184 steps :
@@ -210,7 +210,7 @@ jobs:
210210 echo '127.0.0.1 api-gateway.trustbloc.local' | sudo tee -a /etc/hosts
211211 echo '127.0.0.1 cognito-mock.trustbloc.local' | sudo tee -a /etc/hosts
212212 - name : Install and start docker
213- uses : douglascamata/setup-docker-macos-action@v1-alpha
213+ uses : douglascamata/setup-docker-macos-action@v1.0.1
214214 with :
215215 upgrade-qemu : false
216216 lima : v1.0.4
@@ -265,80 +265,138 @@ jobs:
265265 docker ps -a
266266
267267 AndroidFlutterIntegrationTest :
268- runs-on : macos-13
268+ runs-on : macos-15
269269 needs : [ BuildMockLoginConsentServer, BuilMockTrustRegistryServer, BuilMockAttestationServer, BuildMockSampleWebhookServer ]
270270 timeout-minutes : 60
271+
272+ # NEW: ensure every step talks to the Colima daemon
273+ env :
274+ DOCKER_HOST : unix:///Users/runner/.colima/default/docker.sock
275+ DOCKER_BUILDKIT : " 1"
276+
271277 steps :
272- - name : checkout
278+ # Fetch tags so your version script doesn't print "No names found"
279+ - name : Checkout
273280 uses : actions/checkout@v4
281+ with :
282+ fetch-depth : 0
283+ fetch-tags : true
284+
274285 - name : Set up Go
275286 uses : actions/setup-go@v5
276287 with :
277288 go-version : ${{ env.GO_VERSION }}
289+
290+ - name : Configure Go env (proxy & sumdb)
291+ run : |
292+ go env -w GOSUMDB=sum.golang.org
293+ go env -w GOPROXY="https://proxy.golang.org,direct"
294+
278295 - name : Generate and copy Android Binding
279296 run : |
280- echo $PATH
281- echo ${{ github.workspace }}
282- echo ${GOPATH}
283- echo ${GOROOT}
284- export PATH=$PATH:$GOPATH/bin
285- echo $PATH
297+ echo "$PATH"
298+ echo "${{ github.workspace }}"
299+ echo "${GOPATH}"
300+ echo "${GOROOT}"
301+ mkdir -p "$GOPATH/bin"
302+ export PATH="$PATH:$GOPATH/bin"
303+ echo "$PATH"
286304 go install golang.org/x/mobile/cmd/gomobile@latest
287305 gomobile init
288306 NEW_VERSION=testVer GIT_REV=testRev BUILD_TIME=testTime make generate-android-bindings copy-android-bindings
289307 env :
290308 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
291- GOPATH : /Users/runner/work/wallet-sdk/go
309+ GOPATH : ${{ github.workspace }}/.gopath
310+
292311 - name : Setup hosts
293312 run : |
294- echo '127.0.0.1 file-server.trustbloc.local' | sudo tee -a /etc/hosts
295- echo '127.0.0.1 did-resolver.trustbloc.local' | sudo tee -a /etc/hosts
296- echo '127.0.0.1 vc-rest-echo.trustbloc.local' | sudo tee -a /etc/hosts
297- echo '127.0.0.1 api-gateway.trustbloc.local' | sudo tee -a /etc/hosts
298- echo '127.0.0.1 cognito-mock.trustbloc.local' | sudo tee -a /etc/hosts
299- - name : Install and start docker
300- uses : douglascamata/setup-docker-macos-action@v1-alpha
301- with :
302- upgrade-qemu : false
303- lima : v1.0.4
304- colima : v0.8.1
313+ echo '127.0.0.1 file-server.trustbloc.local' | sudo tee -a /etc/hosts
314+ echo '127.0.0.1 did-resolver.trustbloc.local' | sudo tee -a /etc/hosts
315+ echo '127.0.0.1 vc-rest-echo.trustbloc.local' | sudo tee -a /etc/hosts
316+ echo '127.0.0.1 api-gateway.trustbloc.local' | sudo tee -a /etc/hosts
317+ echo '127.0.0.1 cognito-mock.trustbloc.local' | sudo tee -a /etc/hosts
318+
319+ # Install Docker CLI and start Colima
320+ - name : Install Docker (Colima) on macOS
321+ env :
322+ HOMEBREW_NO_INSTALL_CLEANUP : " 1"
323+ HOMEBREW_NO_ENV_HINTS : " 1"
324+ HOMEBREW_NO_ANALYTICS : " 1"
325+ NONINTERACTIVE : " 1"
326+ run : |
327+ set -euxo pipefail
328+ brew update
329+ brew install colima docker docker-buildx
330+ colima start --cpu 4 --memory 8 --disk 20
331+ # Select context (persists in ~/.docker)
332+ docker context use colima
333+ # Wait until the engine is REALLY ready
334+ for i in {1..60}; do
335+ if docker info >/dev/null 2>&1; then
336+ break
337+ fi
338+ sleep 2
339+ done
340+ docker version
341+ docker info
342+
343+ # NEW: double-check Docker before image loads (handles rare races/crashes)
344+ - name : Ensure Docker is up (Colima)
345+ run : |
346+ colima status || colima start --cpu 4 --memory 8 --disk 20
347+ for i in {1..60}; do
348+ if docker info >/dev/null 2>&1; then
349+ break
350+ fi
351+ sleep 2
352+ done
353+ docker context inspect
354+ echo "Docker is ready."
355+
305356 - name : Download artifacts (Docker images) from previous workflows
306357 uses : actions/download-artifact@v4
358+
307359 - name : Load mock-login-consent server
308- run : |
309- docker load --input mock-login-consent/mock-login-consent.tar
360+ run : docker load --input mock-login-consent/mock-login-consent.tar
361+
310362 - name : Load mock test registry server
311- run : |
312- docker load --input mock-trust-registry/mock-trust-registry.tar
363+ run : docker load --input mock-trust-registry/mock-trust-registry.tar
364+
313365 - name : Load mock attestation server
314- run : |
315- docker load --input mock-attestation/mock-attestation.tar
366+ run : docker load --input mock-attestation/mock-attestation.tar
367+
316368 - name : Load mock-sample-webhook server
317- run : |
318- docker load --input mock-sample-webhook/mock-sample-webhook.tar
369+ run : docker load --input mock-sample-webhook/mock-sample-webhook.tar
370+
319371 - name : Generate test cli and keys
320- run : |
321- make build-integration-cli generate-test-keys
372+ run : make build-integration-cli generate-test-keys
373+
322374 - name : Setup env for integration test
323- run : |
324- make start-integration-env-flutter
375+ run : make start-integration-env-flutter
376+
325377 - name : Gradle cache
326378 uses : gradle/gradle-build-action@v3
327- - uses : actions/setup-java@v3
379+
380+ - name : Set up Java
381+ uses : actions/setup-java@v3
328382 with :
329383 distribution : ' zulu'
330384 java-version : ' 21'
385+
331386 - name : Setup Flutter SDK
332387 uses : flutter-actions/setup-flutter@v2
333388 with :
334389 channel : stable
335390 version : 3.27.4
391+
336392 - name : Install flutter app dependencies
337393 run : make install-flutter-dependencies
394+
338395 - name : Build APK in Debug mode
339396 run : |
340397 cd demo/app
341398 flutter build apk --debug
399+
342400 - name : Run flutter and android tests on Emulator
343401 uses : reactivecircus/android-emulator-runner@v2
344402 with :
@@ -348,8 +406,24 @@ jobs:
348406 emulator-options : -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
349407 disable-animations : true
350408 script : adb reverse tcp:8075 tcp:8075 && adb reverse tcp:8072 tcp:8072 && adb reverse tcp:9229 tcp:9229 && adb reverse tcp:8097 tcp:8097 && make integration-test-flutter integration-test-android
409+
351410 - name : Docker container status output
352411 if : always()
353412 run : |
354413 docker images
355414 docker ps -a
415+
416+ # Helpful logs if anything Docker/Colima fails
417+ - name : Colima diagnostics
418+ if : failure()
419+ run : |
420+ set -x
421+ colima status || true
422+ colima list || true
423+ colima logs --last 200 || true
424+ docker context ls || true
425+ docker info || true
426+
427+ - name : Stop Colima
428+ if : always()
429+ run : colima stop || true
0 commit comments