Skip to content

End-to-end

End-to-end #285

Workflow file for this run

---
name: End-to-end
on:
push:
branches:
- main
- 'release/**'
schedule:
- cron: "0 3 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
end-to-end:
name: build
runs-on: macos-13
steps:
- name: Mask apikey
env:
APIKEY: ${{ inputs.apiKey || secrets.APIKEY }}
run: echo "::add-mask::${{env.APIKEY}}"
- name: Checkout Code
uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0.1'
- name: Install SSH Key
uses: shimataro/[email protected]
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: github.com
- name: Adding Known Hosts
run: ssh-keyscan -H github.com >> ~/.ssh/known_hosts
- name: Create properties file
working-directory: E2E/e2eTests/Resources
env:
MEDIATOR_OOB_URL: ${{ inputs.mediatorOobUrl || vars.MEDIATOR_OOB_URL }}
PRISM_AGENT_URL: ${{ inputs.prismAgentUrl || vars.PRISM_AGENT_URL }}
PUBLISHED_DID: ${{ inputs.publishedDid || vars.PUBLISHED_DID }}
JWT_SCHEMA_GUID: ${{ inputs.jwtSchemaGuid || vars.JWT_SCHEMA_GUID }}
ANONCRED_DEFINITION_GUID: ${{ inputs.anoncredDefinitionGuid || vars.ANONCRED_DEFINITION_GUID }}
APIKEY: ${{ inputs.apiKey || secrets.APIKEY }}
run: |
cat <<EOL > properties.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>MEDIATOR_OOB_URL</key>
<string>${{env.MEDIATOR_OOB_URL}}</string>
<key>PRISM_AGENT_URL</key>
<string>${{env.PRISM_AGENT_URL}}</string>
<key>APIKEY</key>
<string>${{env.APIKEY}}</string>
<key>PUBLISHED_DID</key>
<string>${{env.PUBLISHED_DID}}</string>
<key>JWT_SCHEMA_GUID</key>
<string>${{env.JWT_SCHEMA_GUID}}</string>
<key>ANONCRED_DEFINITION_GUID</key>
<string>${{env.ANONCRED_DEFINITION_GUID}}</string>
</dict>
</plist>
EOL
- name: Run tests
working-directory: E2E
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: xcodebuild build test -scheme "e2e-Package" -destination "platform=iOS Simulator,name=IPhone 14" -resultBundlePath e2eTests/Target/TestResults.xcresult -skipPackagePluginValidation | xcpretty
- name: Publish tests results
uses: kishikawakatsumi/[email protected]
with:
path: E2E/e2eTests/Target/TestResults.xcresult
token: ${{ secrets.GITHUB_TOKEN }}
show-code-coverage: true
if: success() || failure()
- name: Publish report
uses: actions/upload-artifact@v4
with:
name: swift-report
path: E2E/e2eTests/Target/report.html
if-no-files-found: error