BC WALLET RUN ALL TESTS ON ALL DEVICES #948
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: BC WALLET RUN ALL TESTS ON ALL DEVICES | |
on: | |
# repository dispatch: if could be triggered from bc wallet repo then wait for midnight, don't think we can wait. | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" # every day at midnight | |
jobs: | |
check-app-updated: | |
runs-on: ubuntu-latest | |
outputs: | |
APP_IS_NEW: ${{ steps.check-app-updated-on-sl.outputs.APP_IS_NEW }} | |
NEW_APP_NAME: ${{ steps.check-app-updated-on-sl.outputs.NEW_APP_NAME }} | |
steps: | |
- name: checkout-test-harness | |
uses: actions/checkout@v4 | |
- name: check-app-updated-on-sl | |
id: check-app-updated-on-sl | |
run: | | |
output=($(python .github/workflows/bc_wallet/get_sl_apps_uploaded.py ${{ secrets.SAUCE_USERNAME }} ${{ secrets.SAUCE_ACCESS_KEY }} Android us-west-1 .github/workflows/bc_wallet/latest_app.json )) | |
echo ${output[@]} | |
echo ${output[0]} | |
echo ${output[1]} | |
echo "::set-output name=APP_IS_NEW::${output[0]}" | |
echo "::set-output name=NEW_APP_NAME::${output[1]}" | |
run-on-device-tests: | |
needs: [check-app-updated] | |
#needs: [check-app-updated-ios, check-app-updated-android] | |
if: ${{ needs.check-app-updated.outputs.APP_IS_NEW }} == 'true' | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
fail-fast: false | |
matrix: | |
include: | |
- mobile-platform: "-p Android" | |
app-file-name: "-a ${{ needs.check-app-updated.outputs.NEW_APP_NAME }}.aab" | |
report-project: "android-multi-device-full" | |
- mobile-platform: "-p iOS" | |
app-file-name: "-a ${{ needs.check-app-updated.outputs.NEW_APP_NAME }}.ipa" | |
report-project: "ios-multi-device-full" | |
- mobile-platform: "-p Android" | |
app-file-name: "-a ${{ needs.check-app-updated.outputs.NEW_APP_NAME }}.aab" | |
report-project: "candy-uvp-pcft-chat-android" | |
- mobile-platform: "-p iOS" | |
app-file-name: "-a ${{ needs.check-app-updated.outputs.NEW_APP_NAME }}.ipa" | |
report-project: "candy-uvp-pcft-chat-ios" | |
- mobile-platform: "-p Android" | |
app-file-name: "-a ${{ needs.check-app-updated.outputs.NEW_APP_NAME }}.aab" | |
report-project: "bc-digital-id-android" | |
- mobile-platform: "-p iOS" | |
app-file-name: "-a ${{ needs.check-app-updated.outputs.NEW_APP_NAME }}.ipa" | |
report-project: "bc-digital-id-ios" | |
- mobile-platform: "-p Android" | |
app-file-name: "-a ${{ needs.check-app-updated.outputs.NEW_APP_NAME }}.aab" | |
report-project: "bc-showcase-android" | |
- mobile-platform: "-p iOS" | |
app-file-name: "-a ${{ needs.check-app-updated.outputs.NEW_APP_NAME }}.ipa" | |
report-project: "bc-showcase-ios" | |
#timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: run-aath-agents | |
if: ${{ matrix.mobile-platform=='-p iOS' && !contains(matrix.report-project,'candy-uvp-pcft-chat') }} | |
uses: ./.github/workflows/run-aath-agents | |
with: | |
LEDGER_URL_CONFIG: "http://test.bcovrin.vonx.io" | |
USE_NGROK: "" | |
- name: run-aath-agents-ngrok | |
if: ${{ matrix.mobile-platform=='-p Android' && !contains(matrix.report-project,'candy-uvp-pcft-chat') }} | |
uses: ./.github/workflows/run-aath-agents | |
with: | |
NGROK_AUTHTOKEN: ${{ secrets.NGROK_AUTHTOKEN }} | |
LEDGER_URL_CONFIG: "http://test.bcovrin.vonx.io" | |
USE_NGROK: "-n" | |
- name: run-aath-verifier-agent | |
if: ${{ matrix.mobile-platform=='-p iOS' && contains(matrix.report-project,'candy-uvp-pcft-chat') }} | |
uses: ./.github/workflows/run-aath-agents | |
with: | |
TEST_AGENTS: "-b acapy-main" | |
GENESIS_URL: "https://raw.githubusercontent.com/ICCS-ISAC/dtrust-reconu/main/CANdy/test/pool_transactions_genesis" | |
AGENT_CONFIG_FILE: "/aries-backchannels/acapy/read_only_ledger_verifier_config.yaml" | |
USE_NGROK: "" | |
- name: run-aath-verifier-agent-ngrok | |
if: ${{ matrix.mobile-platform=='-p Android' && contains(matrix.report-project,'candy-uvp-pcft-chat') }} | |
uses: ./.github/workflows/run-aath-agents | |
with: | |
NGROK_AUTHTOKEN: ${{ secrets.NGROK_AUTHTOKEN }} | |
TEST_AGENTS: "-b acapy-main" | |
GENESIS_URL: "https://raw.githubusercontent.com/ICCS-ISAC/dtrust-reconu/main/CANdy/test/pool_transactions_genesis" | |
AGENT_CONFIG_FILE: "/aries-backchannels/acapy/read_only_ledger_verifier_config.yaml" | |
USE_NGROK: "-n" | |
- name: run-sauce-connect-tunnel | |
if: ${{ matrix.mobile-platform=='-p iOS' && !contains(matrix.report-project,'candy-uvp-pcft-chat') && !contains(matrix.report-project,'bc-showcase-ios') }} | |
uses: saucelabs/sauce-connect-action@v2 | |
with: | |
username: ${{ secrets.SAUCE_USERNAME }} | |
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} | |
directDomains: apple.com,ppq.apple.com,aries-mediator-agent.vonx.io | |
# tunnelIdentifier: github-action-tunnel | |
# region: us-west-1 | |
# - name: Saucectl RUN Docker and Cloud | |
# uses: saucelabs/saucectl-run-action@v1 | |
# env: | |
# SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}} | |
# SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}} | |
# with: | |
# testing-environment: "" | |
# concurrency: 10 | |
# - name: run-sauce-connect-tunnel | |
# run: | | |
# docker run \ | |
# -e SAUCE_USERNAME=${{ secrets.SAUCE_USERNAME }} \ | |
# -e SAUCE_ACCESS_KEY=${{ secrets.SAUCE_ACCESS_KEY }} \ | |
# --network="host" \ | |
# --detach \ | |
# saucelabs/sauce-connect | |
- name: Run AMTH All Tests | |
if: ${{ contains(matrix.report-project,'multi-device-full') }} | |
uses: ./.github/workflows/run-test-harness | |
env: | |
LEDGER_URL_CONFIG: "http://test.bcovrin.vonx.io" | |
REGION: "us-west-1" | |
#TEST_RETRY_ATTEMPTS_OVERRIDE: "2" | |
with: | |
MOBILE_WALLET: "-w bc_wallet" | |
ISSUER_AGENT: '-i "AATH;http://0.0.0.0:9020"' | |
VERIFIER_AGENT: '-v "AATH;http://0.0.0.0:9030"' | |
DEVICE_CLOUD: "-d SauceLabs" | |
DEVICE_CLOUD_USER: "-u ${{ secrets.SAUCE_USERNAME }}" | |
DEVICE_CLOUD_KEY: "-k ${{ secrets.SAUCE_ACCESS_KEY }}" | |
MOBILE_PLATFORM: ${{ matrix.mobile-platform }} | |
APP_FILE_NAME: ${{ matrix.app-file-name }} | |
TEST_SCOPE: "-t @bc_wallet -t ~@wip -t ~@Connectionless -t ~@BCSC -t ~@BCShowcase" | |
REPORT_PROJECT: ${{ matrix.report-project }} | |
continue-on-error: true | |
# - name: Shutdown Sauce Connect Tunnel | |
# if: ${{ matrix.mobile-platform=='-p iOS' }} | |
# run: | | |
# docker ps \ | |
# --format '{{.ID}} {{.Image}}' | \ | |
# grep saucelabs/sauce-connect | \ | |
# awk '{print $1}' | \ | |
# xargs docker stop | |
- name: Run AMTH BC Wallet Connectionless Tests | |
if: ${{ contains(matrix.report-project,'candy-uvp-pcft-chat') }} | |
uses: ./.github/workflows/run-test-harness | |
env: | |
REGION: "us-west-1" | |
#TEST_RETRY_ATTEMPTS_OVERRIDE: "2" | |
with: | |
MOBILE_WALLET: "-w bc_wallet" | |
ISSUER_AGENT: '-i "CANdy_UVP;https://openvp-candy-issuer-test.apps.silver.devops.gov.bc.ca/"' | |
VERIFIER_AGENT: '-v "AATH;http://0.0.0.0:9030"' | |
DEVICE_CLOUD: "-d SauceLabs" | |
DEVICE_CLOUD_USER: "-u ${{ secrets.SAUCE_USERNAME }}" | |
DEVICE_CLOUD_KEY: "-k ${{ secrets.SAUCE_ACCESS_KEY }}" | |
MOBILE_PLATFORM: ${{ matrix.mobile-platform }} | |
APP_FILE_NAME: ${{ matrix.app-file-name }} | |
TEST_SCOPE: "-t @bc_wallet -t @Connectionless -t ~@wip -t ~@BCSC -t ~@BCShowcase" | |
REPORT_PROJECT: ${{ matrix.report-project }} | |
continue-on-error: true | |
- name: Run AMTH BC Wallet BC Digital ID Tests | |
#if: ${{ matrix.report-project=='bc-digital-id-ios' || matrix.report-project=='bc-digital-id-android' }} | |
if: ${{ contains(matrix.report-project,'bc-digital-id') }} | |
uses: ./.github/workflows/run-test-harness | |
env: | |
REGION: "us-west-1" | |
BC_VP_USERNAME: ${{ secrets.BC_VP_USERNAME }} | |
BC_VP_PASSWORD: ${{ secrets.BC_VP_PASSWORD }} | |
BC_VP_HOLDER_EMAIL: ${{ secrets.BC_VP_HOLDER_EMAIL }} | |
BC_VP_HOLDER_EMAIL_PASSWORD: ${{ secrets.BC_VP_HOLDER_EMAIL_PASSWORD }} | |
BCSC_ACCOUNT_USER: ${{ secrets.BCSC_ACCOUNT_USER }} | |
BCSC_ACCOUNT_PASSWORD: ${{ secrets.BCSC_ACCOUNT_PASSWORD }} | |
# GOOGLE_API_TOKEN: ${{ secrets.GOOGLE_API_TOKEN }} | |
# GOOGLE_API_CREDENTIALS: ${{ secrets.GOOGLE_API_CREDENTIALS }} | |
#TEST_RETRY_ATTEMPTS_OVERRIDE: "2" | |
with: | |
MOBILE_WALLET: "-w bc_wallet" | |
ISSUER_AGENT: '-i "BC_VP;https://bcvcpilot-issuer-admin-test.apps.silver.devops.gov.bc.ca"' | |
VERIFIER_AGENT: '-v "AATH;http://0.0.0.0:9030"' | |
DEVICE_CLOUD: "-d SauceLabs" | |
DEVICE_CLOUD_USER: "-u ${{ secrets.SAUCE_USERNAME }}" | |
DEVICE_CLOUD_KEY: "-k ${{ secrets.SAUCE_ACCESS_KEY }}" | |
MOBILE_PLATFORM: ${{ matrix.mobile-platform }} | |
APP_FILE_NAME: ${{ matrix.app-file-name }} | |
TEST_SCOPE: "-t @bc_wallet -t @BCSC -t ~@wip" | |
REPORT_PROJECT: ${{ matrix.report-project }} | |
continue-on-error: true | |
- name: Run BC Wallet with BC Showcase Tests | |
if: ${{ contains(matrix.report-project,'bc-showcase') }} | |
uses: ./.github/workflows/run-test-harness | |
env: | |
LEDGER_URL_CONFIG: "http://test.bcovrin.vonx.io" | |
REGION: "us-west-1" | |
#TEST_RETRY_ATTEMPTS_OVERRIDE: "2" | |
with: | |
MOBILE_WALLET: "-w bc_wallet" | |
ISSUER_AGENT: '-i "BCShowcaseIssuer;https://bc-wallet-demo.apps.silver.devops.gov.bc.ca/"' | |
VERIFIER_AGENT: '-v "BCShowcaseVerifier;https://bc-wallet-demo.apps.silver.devops.gov.bc.ca/"' | |
DEVICE_CLOUD: "-d SauceLabs" | |
DEVICE_CLOUD_USER: "-u ${{ secrets.SAUCE_USERNAME }}" | |
DEVICE_CLOUD_KEY: "-k ${{ secrets.SAUCE_ACCESS_KEY }}" | |
MOBILE_PLATFORM: ${{ matrix.mobile-platform }} | |
APP_FILE_NAME: ${{ matrix.app-file-name }} | |
TEST_SCOPE: "-t @bc_wallet -t @BCShowcase -t ~@wip" | |
REPORT_PROJECT: ${{ matrix.report-project }} | |
continue-on-error: true | |
- name: archive screenshots | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-screenshots_from_main | |
path: ./*.png | |
retention-days: 7 | |
- name: Upload AMTH All Test results to Allure | |
uses: ./.github/workflows/run-send-gen-test-results-secure | |
with: | |
REPORT_PROJECT: ${{ matrix.report-project }} | |
ADMIN_USER: ${{ secrets.ALLURE_USERNAME }} | |
ADMIN_PW: ${{ secrets.ALLURE_PASSWD }} |