Skip to content

test: add e2e tests

test: add e2e tests #9

Workflow file for this run

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://mediator.rootsid.cloud/oob_url
prismAgentUrl:
required: true
description: Prism-agent server url
default: https://k8s-dev.atalaprism.io/prism-agent
publishedDid:
required: false
description: Published DID
schemaId:
required: false
description: Schema ID
apiKey:
required: false
description: Authorization key
pull_request:
branches:
- main
env:
ATALA_GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }}
ATALA_GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
MEDIATOR_OOB_URL: ${{ inputs.mediatorOobUrl || secrets.MEDIATOR_OOB_URL }}
PRISM_AGENT_URL: ${{ inputs.prismAgentUrl || secrets.PRISM_AGENT_URL }}
PUBLISHED_DID: ${{ inputs.publishedDid || secrets.PUBLISHED_DID }}
SCHEMA_ID: ${{ inputs.schemaId || secrets.SCHEMA_ID }}
APIKEY: ${{ inputs.apiKey || secrets.APIKEY }}
NODE_AUTH_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
jobs:
run-e2e-tests:
name: "Run"
runs-on: ubuntu-latest
steps:
- name: Mask apikey
run: echo "::add-mask::${{env.APIKEY}}"
- name: Checkout Code
uses: actions/checkout@v3
with:
token: ${{ secrets.ATALA_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 == 'pull_request'
run: |
./gradlew publishToMavenLocal
- name: Run tests
working-directory: tests/end-to-end
run: |
./gradlew test --tests "TestSuite"
- name: Add notes to summary
working-directory: tests/end-to-end
run: cat notes >> $GITHUB_STEP_SUMMARY
- name: Publish Serenity report
uses: actions/upload-artifact@v3
with:
name: atala-prism-sdk-kmm.zip
path: tests/end-to-end/target/site/serenity
if-no-files-found: error