diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4636658d..9f8ae54a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,6 +109,29 @@ jobs: name: mock-login-consent path: /tmp/mock-login-consent.tar + BuildMockSampleWebhookServer: + runs-on: ubuntu-24.04 + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + - name: Build docker images for test server + run: | + docker build -f ./images/mocks/webhook/Dockerfile --no-cache -t wallet-sdk/sample-webhook:latest \ + --build-arg GO_VER=1.22 \ + --build-arg ALPINE_VER=3.18 . + - name: Save docker image as tar + run: | + docker save --output /tmp/mock-sample-webhook.tar wallet-sdk/sample-webhook + - name: Upload image to artifact + uses: actions/upload-artifact@v4 + with: + name: mock-sample-webhook + path: /tmp/mock-sample-webhook.tar + BuilMockTrustRegistryServer: runs-on: ubuntu-24.04 timeout-minutes: 5 @@ -156,8 +179,8 @@ jobs: path: /tmp/mock-attestation.tar iOSFlutterIntegrationTest: - runs-on: macos-12 - needs: [ BuildMockLoginConsentServer, BuilMockTrustRegistryServer, BuilMockAttestationServer ] + runs-on: macos-13 + needs: [ BuildMockLoginConsentServer, BuilMockTrustRegistryServer, BuilMockAttestationServer, BuildMockSampleWebhookServer ] steps: - name: Checkout uses: actions/checkout@v4 @@ -179,15 +202,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOPATH: /Users/runner/work/wallet-sdk/go - - name: Install and start docker + - name: Setup hosts run: | echo '127.0.0.1 file-server.trustbloc.local' | sudo tee -a /etc/hosts echo '127.0.0.1 did-resolver.trustbloc.local' | sudo tee -a /etc/hosts echo '127.0.0.1 vc-rest-echo.trustbloc.local' | sudo tee -a /etc/hosts echo '127.0.0.1 api-gateway.trustbloc.local' | sudo tee -a /etc/hosts echo '127.0.0.1 cognito-mock.trustbloc.local' | sudo tee -a /etc/hosts - brew install docker docker-compose - colima start + - name: Install and start docker + uses: douglascamata/setup-docker-macos-action@8d5fa43892aed7eee4effcdea113fd53e4d4bf83 + with: + upgrade-qemu: false + lima: v0.22.0 + colima: v0.7.3 - name: Download artifacts (Docker images) from previous workflows uses: actions/download-artifact@v4 - name: Load mock-login-consent server @@ -199,6 +226,9 @@ jobs: - name: Load mock attestation server run: | docker load --input mock-attestation/mock-attestation.tar + - name: Load mock-sample-webhook server + run: | + docker load --input mock-sample-webhook/mock-sample-webhook.tar - name: Generate test cli and keys run: | make build-integration-cli generate-test-keys @@ -229,8 +259,8 @@ jobs: docker ps -a AndroidFlutterIntegrationTest: - runs-on: macos-12 - needs: [ BuildMockLoginConsentServer, BuilMockTrustRegistryServer, BuilMockAttestationServer ] + runs-on: macos-13 + needs: [ BuildMockLoginConsentServer, BuilMockTrustRegistryServer, BuilMockAttestationServer, BuildMockSampleWebhookServer ] steps: - name: checkout uses: actions/checkout@v4 @@ -252,15 +282,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOPATH: /Users/runner/work/wallet-sdk/go - - name: Install and start docker + - name: Setup hosts run: | echo '127.0.0.1 file-server.trustbloc.local' | sudo tee -a /etc/hosts echo '127.0.0.1 did-resolver.trustbloc.local' | sudo tee -a /etc/hosts echo '127.0.0.1 vc-rest-echo.trustbloc.local' | sudo tee -a /etc/hosts echo '127.0.0.1 api-gateway.trustbloc.local' | sudo tee -a /etc/hosts echo '127.0.0.1 cognito-mock.trustbloc.local' | sudo tee -a /etc/hosts - brew install docker docker-compose - colima start + - name: Install and start docker + uses: douglascamata/setup-docker-macos-action@8d5fa43892aed7eee4effcdea113fd53e4d4bf83 + with: + upgrade-qemu: false + lima: v0.22.0 + colima: v0.7.3 - name: Download artifacts (Docker images) from previous workflows uses: actions/download-artifact@v4 - name: Load mock-login-consent server @@ -272,6 +306,9 @@ jobs: - name: Load mock attestation server run: | docker load --input mock-attestation/mock-attestation.tar + - name: Load mock-sample-webhook server + run: | + docker load --input mock-sample-webhook/mock-sample-webhook.tar - name: Generate test cli and keys run: | make build-integration-cli generate-test-keys diff --git a/cmd/wallet-sdk-gomobile/Makefile b/cmd/wallet-sdk-gomobile/Makefile index 84fabc49..54a8f921 100644 --- a/cmd/wallet-sdk-gomobile/Makefile +++ b/cmd/wallet-sdk-gomobile/Makefile @@ -7,11 +7,11 @@ generate-all-bindings: dependencies gomobile-android-bind gomobile-ios-bind @make tidy .PHONY: generate-android-bindings -generate-android-bindings: dependencies gomobile-android-bind +generate-android-bindings: gomobile-android-bind @make tidy .PHONY: generate-ios-bindings -generate-ios-bindings: dependencies gomobile-ios-bind +generate-ios-bindings: gomobile-ios-bind @make tidy .PHONY: dependencies @@ -20,13 +20,15 @@ dependencies: @go get -u golang.org/x/mobile/cmd/gomobile .PHONY: gomobile-android-bind -gomobile-android-bind: dependencies +gomobile-android-bind: dependencies tidy + @make dependencies @mkdir -p bindings/android @echo 'Generating Android bindings...' @scripts/build_android_bindings.sh .PHONY: gomobile-ios-bind -gomobile-ios-bind: dependencies +gomobile-ios-bind: dependencies tidy + @make dependencies @mkdir -p bindings/ios @echo 'Generating iOS bindings...' @scripts/build_ios_bindings.sh diff --git a/scripts/ios_test.sh b/scripts/ios_test.sh index 1af10f8c..4dc2ec2c 100755 --- a/scripts/ios_test.sh +++ b/scripts/ios_test.sh @@ -18,4 +18,7 @@ cd ../../demo/app flutter build ios --simulator cd ios -INITIATE_ISSUANCE_URL="${INITIATE_ISSUANCE_URL}" INITIATE_VERIFICATION_URL="${INITIATE_VERIFICATION_URL}" INITIATE_ISSUANCE_URLS_AUTH_CODE_FLOW="${INITIATE_ISSUANCE_URLS_AUTH_CODE_FLOW}" xcodebuild test -workspace Runner.xcworkspace -scheme Runner -destination 'platform=iOS Simulator,name=iPhone 14' +echo "destinations:" +xcodebuild -workspace Runner.xcworkspace -scheme Runner -showdestinations +echo "end destinations:" +INITIATE_ISSUANCE_URL="${INITIATE_ISSUANCE_URL}" INITIATE_VERIFICATION_URL="${INITIATE_VERIFICATION_URL}" INITIATE_ISSUANCE_URLS_AUTH_CODE_FLOW="${INITIATE_ISSUANCE_URLS_AUTH_CODE_FLOW}" xcodebuild test -workspace Runner.xcworkspace -scheme Runner -destination 'platform=iOS Simulator,name=iPhone 14,OS=17.0.1' diff --git a/scripts/prepare_integration_test_flutter.sh b/scripts/prepare_integration_test_flutter.sh index cd34390c..4732392d 100755 --- a/scripts/prepare_integration_test_flutter.sh +++ b/scripts/prepare_integration_test_flutter.sh @@ -13,7 +13,7 @@ ROOT=`pwd` echo "starting containers..." cd $ROOT/test/integration/fixtures -docker pull jaegertracing/all-in-one:1.41 +docker pull jaegertracing/all-in-one:1.62.0 docker pull devopsfaith/krakend:2.1.3 docker pull aholovko/cognito-local:0.2.2 docker images diff --git a/test/integration/fixtures/docker-compose.yml b/test/integration/fixtures/docker-compose.yml index d90cd086..937ebb9f 100644 --- a/test/integration/fixtures/docker-compose.yml +++ b/test/integration/fixtures/docker-compose.yml @@ -41,6 +41,7 @@ services: - VC_TRANSIENT_DATA_STORE_TYPE=redis - VC_REDIS_URL=redis.example.com:6379 - VC_REDIS_DISABLE_TLS=true + - VC_OIDC4CI_TRANSACTION_DATA_TTL=5h ports: - "8075:8075" - "48127:48127"