-
Notifications
You must be signed in to change notification settings - Fork 6
94 lines (82 loc) · 3.13 KB
/
e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
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