Skip to content

feat(deps): updated go libs. Fixed snyk and versioning issues #3328

feat(deps): updated go libs. Fixed snyk and versioning issues

feat(deps): updated go libs. Fixed snyk and versioning issues #3328

Workflow file for this run

name: "wallet-sdk ci"
env:
GO_VERSION: '1.25.1'
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
SemanticPullRequest:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
with:
requireScope: true
scopes: |
sdk
app
deps
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Checks:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- run: make checks
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UnitTest:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- run: make unit-test
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_UPLOAD_TOKEN }}
BuildMockLoginConsentServer:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- run: |
docker build -f ./images/mocks/loginconsent/Dockerfile --no-cache -t wallet-sdk/mock-login-consent:latest \
--build-arg GO_VER=1.25 --build-arg ALPINE_VER=3.22 .
- run: docker save --output /tmp/mock-login-consent.tar wallet-sdk/mock-login-consent
- uses: actions/upload-artifact@v4
with:
name: mock-login-consent
path: /tmp/mock-login-consent.tar
BuildMockSampleWebhookServer:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- run: |
docker build -f ./images/mocks/webhook/Dockerfile --no-cache -t wallet-sdk/sample-webhook:latest \
--build-arg GO_VER=1.25 --build-arg ALPINE_VER=3.22 .
- run: docker save --output /tmp/mock-sample-webhook.tar wallet-sdk/sample-webhook
- uses: actions/upload-artifact@v4
with:
name: mock-sample-webhook
path: /tmp/mock-sample-webhook.tar
BuilMockTrustRegistryServer:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- run: |
docker build -f ./images/mocks/trustregistry/Dockerfile --no-cache -t wallet-sdk/mock-trust-registry:latest \
--build-arg GO_VER=1.25 --build-arg ALPINE_VER=3.22 .
- run: docker save --output /tmp/mock-trust-registry.tar wallet-sdk/mock-trust-registry
- uses: actions/upload-artifact@v4
with:
name: mock-trust-registry
path: /tmp/mock-trust-registry.tar
BuilMockAttestationServer:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- run: |
docker build -f ./images/mocks/attestation/Dockerfile --no-cache -t wallet-sdk/mock-attestation:latest \
--build-arg GO_VER=1.25 --build-arg ALPINE_VER=3.22 .
- run: docker save --output /tmp/mock-attestation.tar wallet-sdk/mock-attestation
- uses: actions/upload-artifact@v4
with:
name: mock-attestation
path: /tmp/mock-attestation.tar
iOSFlutterIntegrationTest:
runs-on: macos-14
needs: [ BuildMockLoginConsentServer, BuilMockTrustRegistryServer, BuilMockAttestationServer, BuildMockSampleWebhookServer ]
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- run: |
export PATH=$PATH:$GOPATH/bin
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:
GOPATH: /Users/runner/work/wallet-sdk/go
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
- uses: douglascamata/setup-docker-macos-action@v1
with:
lima: v1.0.4
colima: v0.8.1
colima-network-address: false
- run: |
docker version
colima status
docker run --rm hello-world || true
- uses: actions/download-artifact@v4
- run: docker load --input mock-login-consent/mock-login-consent.tar
- run: docker load --input mock-trust-registry/mock-trust-registry.tar
- run: docker load --input mock-attestation/mock-attestation.tar
- run: docker load --input mock-sample-webhook/mock-sample-webhook.tar
- run: make build-integration-cli generate-test-keys
- run: make start-integration-env-flutter
- uses: flutter-actions/setup-flutter@v2
with:
channel: stable
version: 3.27.4
- run: make install-flutter-dependencies
- uses: futureware-tech/simulator-action@v3
with:
model: 'iPhone 15'
- run: |
rm -f demo/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
rm -f demo/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
- run: ls -lah $GITHUB_WORKSPACE/demo/app/integration_test/
- run: chmod +r $GITHUB_WORKSPACE/demo/app/integration_test/openid4ci_test.dart
- run: make integration-test-flutter
- run: make integration-test-ios
- if: always()
run: |
docker images
docker ps -a
AndroidFlutterIntegrationTest:
runs-on: macos-14
needs: [ BuildMockLoginConsentServer, BuilMockTrustRegistryServer, BuilMockAttestationServer, BuildMockSampleWebhookServer ]
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Set publish env defaults
run: |
echo "ANDROID_GROUP_ID=dev.placeholder" >> $GITHUB_ENV
echo "ANDROID_ARTIFACT_ID=walletsdk" >> $GITHUB_ENV
echo "ANDROID_VERSION=0.0.0-ci" >> $GITHUB_ENV
echo "PROJECT_PKG_REPO=https://maven.pkg.github.com/${{ github.repository }}" >> $GITHUB_ENV
echo "TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- run: |
export PATH=$PATH:$GOPATH/bin
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:
GOPATH: /Users/runner/work/wallet-sdk/go
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
- uses: douglascamata/setup-docker-macos-action@v1
with:
lima: v1.0.4
colima: v0.8.1
colima-network-address: false
- run: |
docker version
colima status
docker run --rm hello-world || true
- uses: actions/download-artifact@v4
- run: docker load --input mock-login-consent/mock-login-consent.tar
- run: docker load --input mock-trust-registry/mock-trust-registry.tar
- run: docker load --input mock-attestation/mock-attestation.tar
- run: docker load --input mock-sample-webhook/mock-sample-webhook.tar
- run: make build-integration-cli generate-test-keys
- run: make start-integration-env-flutter
- uses: gradle/gradle-build-action@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'
- uses: flutter-actions/setup-flutter@v2
with:
channel: stable
version: 3.27.4
- run: make install-flutter-dependencies
- run: |
cd demo/app
flutter build apk --debug
- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
arch: arm64-v8a
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
- if: always()
run: |
docker images
docker ps -a