Skip to content

Commit

Permalink
ci(app): update macos-13 runner
Browse files Browse the repository at this point in the history
Signed-off-by: Misha Sizov <[email protected]>
  • Loading branch information
mishasizov-SK committed Oct 19, 2024
1 parent 4e24ebe commit 02842ec
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 16 deletions.
57 changes: 47 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
10 changes: 6 additions & 4 deletions cmd/wallet-sdk-gomobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion scripts/ios_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
2 changes: 1 addition & 1 deletion scripts/prepare_integration_test_flutter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/integration/fixtures/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 02842ec

Please sign in to comment.