Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
370 changes: 185 additions & 185 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,189 +177,189 @@ jobs:
name: mock-attestation
path: /tmp/mock-attestation.tar

iOSFlutterIntegrationTest:
runs-on: macos-13
needs: [ BuildMockLoginConsentServer, BuilMockTrustRegistryServer, BuilMockAttestationServer, BuildMockSampleWebhookServer ]
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Generate and copy iOS Binding
run: |
echo $PATH
echo ${{ github.workspace }}
echo ${GOPATH}
echo ${GOROOT}
export PATH=$PATH:$GOPATH/bin
echo $PATH
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
NEW_VERSION=testVer GIT_REV=testRev BUILD_TIME=testTime make generate-ios-bindings copy-ios-bindings
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOPATH: /Users/runner/work/wallet-sdk/go
- 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
- name: Install and start Docker (Colima)
uses: douglascamata/setup-docker-macos-action@v1
with:
lima: v1.0.4
colima: v0.8.1
colima-network-address: false
- name: Verify Docker/Colima
run: |
docker version
colima status
docker run --rm hello-world || true
- name: Download artifacts (Docker images) from previous workflows
uses: actions/download-artifact@v4
- name: Load mock-login-consent server
run: |
docker load --input mock-login-consent/mock-login-consent.tar
- name: Load mock test registry server
run: |
docker load --input mock-trust-registry/mock-trust-registry.tar
- 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
- name: Setup env for integration test
run: |
make start-integration-env-flutter
- name: Setup Flutter SDK
uses: flutter-actions/setup-flutter@v2
with:
channel: stable
version: 3.27.4
- name: Install flutter app dependencies
run: make install-flutter-dependencies
- name: Run iOS Simulator
uses: futureware-tech/simulator-action@v3
with:
model: 'iPhone 15'
- name: Remove AppIcon contents file (Simulator build fails with this file)
run: |
rm -rf demo/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
rm -rf demo/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
- name: Debug Path
run: ls -lah $GITHUB_WORKSPACE/demo/app/integration_test/
- name: Fix file permissions
run: chmod +r $GITHUB_WORKSPACE/demo/app/integration_test/openid4ci_test.dart
- name: Run flutter tests on Simulator
run: make integration-test-flutter
- name: Run ios tests on Simulator
run: make integration-test-ios
- name: Docker container status output
if: always()
run: |
docker images
docker ps -a
# iOSFlutterIntegrationTest:
# runs-on: macos-15-intel
# needs: [ BuildMockLoginConsentServer, BuilMockTrustRegistryServer, BuilMockAttestationServer, BuildMockSampleWebhookServer ]
# timeout-minutes: 60
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Set up Go
# uses: actions/setup-go@v5
# with:
# go-version: ${{ env.GO_VERSION }}
# - name: Generate and copy iOS Binding
# run: |
# echo $PATH
# echo ${{ github.workspace }}
# echo ${GOPATH}
# echo ${GOROOT}
# export PATH=$PATH:$GOPATH/bin
# echo $PATH
# go install golang.org/x/mobile/cmd/gomobile@latest
# gomobile init
# NEW_VERSION=testVer GIT_REV=testRev BUILD_TIME=testTime make generate-ios-bindings copy-ios-bindings
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GOPATH: /Users/runner/work/wallet-sdk/go
# - 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
# - name: Install and start Docker (Colima)
# uses: douglascamata/setup-docker-macos-action@v1.1.0
# with:
# lima: v1.0.4
# colima: v0.8.1
# colima-network-address: false
# - name: Verify Docker/Colima
# run: |
# set -euxo pipefail
# colima start --runtime docker
# docker context use colima
# - name: Download artifacts (Docker images) from previous workflows
# uses: actions/download-artifact@v4
# - name: Load mock-login-consent server
# run: |
# docker load --input mock-login-consent/mock-login-consent.tar
# - name: Load mock test registry server
# run: |
# docker load --input mock-trust-registry/mock-trust-registry.tar
# - 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
# - name: Setup env for integration test
# run: |
# make start-integration-env-flutter
# - name: Setup Flutter SDK
# uses: flutter-actions/setup-flutter@v2
# with:
# channel: stable
# version: 3.27.4
# - name: Install flutter app dependencies
# run: make install-flutter-dependencies
# - name: Run iOS Simulator
# uses: futureware-tech/simulator-action@v3
# with:
# model: 'iPhone 16'
# - name: Remove AppIcon contents file (Simulator build fails with this file)
# run: |
# rm -rf demo/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
# rm -rf demo/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
# - name: Debug Path
# run: ls -lah $GITHUB_WORKSPACE/demo/app/integration_test/
# - name: Fix file permissions
# run: chmod +r $GITHUB_WORKSPACE/demo/app/integration_test/openid4ci_test.dart
# - name: Run flutter tests on Simulator
# run: make integration-test-flutter
# - name: Run ios tests on Simulator
# run: make integration-test-ios
# - name: Docker container status output
# if: always()
# run: |
# docker images
# docker ps -a

AndroidFlutterIntegrationTest:
runs-on: macos-13
needs: [ BuildMockLoginConsentServer, BuilMockTrustRegistryServer, BuilMockAttestationServer, BuildMockSampleWebhookServer ]
timeout-minutes: 60
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Generate and copy Android Binding
run: |
echo $PATH
echo ${{ github.workspace }}
echo ${GOPATH}
echo ${GOROOT}
export PATH=$PATH:$GOPATH/bin
echo $PATH
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
NEW_VERSION=testVer GIT_REV=testRev BUILD_TIME=testTime make generate-android-bindings copy-android-bindings
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOPATH: /Users/runner/work/wallet-sdk/go
- 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
- name: Install and start Docker (Colima)
uses: douglascamata/setup-docker-macos-action@v1-alpha
with:
lima: v1.0.4
colima: v0.8.1
colima-network-address: false
- name: Verify Docker/Colima
run: |
docker version
colima status
docker run --rm hello-world || true
- name: Download artifacts (Docker images) from previous workflows
uses: actions/download-artifact@v4
- name: Load mock-login-consent server
run: |
docker load --input mock-login-consent/mock-login-consent.tar
- name: Load mock test registry server
run: |
docker load --input mock-trust-registry/mock-trust-registry.tar
- 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
- name: Setup env for integration test
run: |
make start-integration-env-flutter
- name: Gradle cache
uses: gradle/gradle-build-action@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'
- name: Setup Flutter SDK
uses: flutter-actions/setup-flutter@v2
with:
channel: stable
version: 3.27.4
- name: Install flutter app dependencies
run: make install-flutter-dependencies
- name: Build APK in Debug mode
run: |
cd demo/app
flutter build apk --debug
- name: Run flutter and android tests on Emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 32
arch: x86_64
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
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
- name: Docker container status output
if: always()
run: |
docker images
docker ps -a
# AndroidFlutterIntegrationTest:
# runs-on: macos-15-intel
# needs: [ BuildMockLoginConsentServer, BuilMockTrustRegistryServer, BuilMockAttestationServer, BuildMockSampleWebhookServer ]
# timeout-minutes: 60
# steps:
# - name: checkout
# uses: actions/checkout@v4
# - name: Set up Go
# uses: actions/setup-go@v5
# with:
# go-version: ${{ env.GO_VERSION }}
# - name: Generate and copy Android Binding
# run: |
# echo $PATH
# echo ${{ github.workspace }}
# echo ${GOPATH}
# echo ${GOROOT}
# export PATH=$PATH:$GOPATH/bin
# echo $PATH
# go install golang.org/x/mobile/cmd/gomobile@latest
# gomobile init
# NEW_VERSION=testVer GIT_REV=testRev BUILD_TIME=testTime make generate-android-bindings copy-android-bindings
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GOPATH: /Users/runner/work/wallet-sdk/go
# - 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
# - name: Install and start Docker (Colima)
# uses: douglascamata/setup-docker-macos-action@v1.1.0
# with:
# lima: v1.0.4
# colima: v0.8.1
# colima-network-address: false
# - name: Verify Docker/Colima
# run: |
# set -euxo pipefail
# colima start --runtime docker
# docker context use colima
# - name: Download artifacts (Docker images) from previous workflows
# uses: actions/download-artifact@v4
# - name: Load mock-login-consent server
# run: |
# docker load --input mock-login-consent/mock-login-consent.tar
# - name: Load mock test registry server
# run: |
# docker load --input mock-trust-registry/mock-trust-registry.tar
# - 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
# - name: Setup env for integration test
# run: |
# make start-integration-env-flutter
# - name: Gradle cache
# uses: gradle/gradle-build-action@v3
# - uses: actions/setup-java@v3
# with:
# distribution: 'zulu'
# java-version: '21'
# - name: Setup Flutter SDK
# uses: flutter-actions/setup-flutter@v2
# with:
# channel: stable
# version: 3.27.4
# - name: Install flutter app dependencies
# run: make install-flutter-dependencies
# - name: Build APK in Debug mode
# run: |
# cd demo/app
# flutter build apk --debug
# - name: Run flutter and android tests on Emulator
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 32
# arch: x86_64
# force-avd-creation: false
# emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# disable-animations: true
# 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
# - name: Docker container status output
# if: always()
# run: |
# docker images
# docker ps -a
2 changes: 1 addition & 1 deletion demo/app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ dependencies {
} else {
implementation(name: 'walletsdk', ext: 'aar')
}
implementation 'androidx.datastore:datastore-core-android:+'
implementation 'androidx.datastore:datastore-core-android:1.1.1'

androidTestImplementation "androidx.test:core:1.5.0"
androidTestImplementation "androidx.test:core-ktx:1.5.0"
Expand Down
1 change: 0 additions & 1 deletion demo/app/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ allprojects {
repositories {
google()
mavenCentral()
jcenter()
if (walletSdkPkgUsr != null) {
maven {
url = 'https://maven.pkg.github.com/trustbloc-cicd/snapshot'
Expand Down
Loading