End-to-end tests #791
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: End-to-end tests | |
concurrency: | |
group: ${{ github.head_ref }}${{ github.ref }}-e2e | |
cancel-in-progress: true | |
on: | |
schedule: | |
- cron: "0 1 * * *" | |
workflow_dispatch: | |
inputs: | |
mediatorOobUrl: | |
required: true | |
description: Mediator out-of-band url | |
default: https://stable-mediator.atalaprism.io/invitationOOB | |
agentUrl: | |
required: true | |
description: Prism-agent server url | |
default: https://dev-agent-a.atalaprism.io/cloud-agent | |
apiKey: | |
required: false | |
description: Authorization key | |
publishedDid: | |
required: false | |
description: Published DID | |
jwtSchemaGuid: | |
required: false | |
description: JWT schema GUID | |
anoncredDefinitionGuid: | |
required: false | |
description: Anoncred definition GUID | |
push: | |
branches: | |
- 'main' | |
- 'release/**' | |
env: | |
GITHUB_ACTOR: "hyperledger-bot" | |
GITHUB_ACTOR_EMAIL: "hyperledger-bot@hyperledger.org" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
run-e2e-tests: | |
name: 'Run' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Mask apikey | |
env: | |
APIKEY: ${{ inputs.apiKey || secrets.APIKEY }} | |
run: echo "::add-mask::${{env.APIKEY}}" | |
- name: Install Java 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'adopt' | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
fetch-depth: 0 | |
- name: Gradle Build Action | |
uses: gradle/gradle-build-action@v2 | |
- name: Publish to maven local | |
if: github.event_name == 'push' || github.event_name == 'schedule' | |
run: | | |
./gradlew publishToMavenLocal | |
- name: Run tests | |
env: | |
MEDIATOR_OOB_URL: ${{ inputs.mediatorOobUrl || vars.MEDIATOR_OOB_URL }} | |
AGENT_URL: ${{ inputs.agentUrl || vars.AGENT_URL }} | |
PUBLISHED_DID: ${{ inputs.publishedDid || vars.PUBLISHED_DID }} | |
JWT_SCHEMA_GUID: ${{ inputs.jwtSchemaGuid || vars.SCHEMA_ID }} | |
ANONCRED_DEFINITION_GUID: ${{ inputs.anoncredDefinitionGuid || vars.ANONCRED_DEFINITION_GUID }} | |
APIKEY: ${{ inputs.apiKey || secrets.APIKEY }} | |
working-directory: tests/end-to-end | |
run: | | |
./gradlew test --tests "TestSuite" | |
- name: Add notes to summary | |
if: always() | |
working-directory: tests/end-to-end | |
run: cat notes >> "$GITHUB_STEP_SUMMARY" | |
- name: Publish Serenity report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: edge-agent-sdk-kmp | |
path: tests/end-to-end/target/site/serenity | |
if-no-files-found: 'error' |