|
1 |
| ---- |
2 |
| -name: End-to-end |
| 1 | +name: Integration |
3 | 2 |
|
4 | 3 | on:
|
5 | 4 | push:
|
6 | 5 | branches:
|
7 |
| - - main |
8 |
| - - 'release/**' |
9 |
| - schedule: |
10 |
| - - cron: "0 3 * * *" |
11 |
| - |
12 |
| -concurrency: |
13 |
| - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
14 |
| - cancel-in-progress: true |
| 6 | + - "main" |
| 7 | + tags: |
| 8 | + - "*" |
15 | 9 |
|
16 | 10 | jobs:
|
17 |
| - end-to-end: |
18 |
| - name: build |
19 |
| - runs-on: macos-13 |
| 11 | + integrate-revision: |
| 12 | + if: github.ref == 'refs/heads/main' |
| 13 | + name: Integrate revision |
| 14 | + runs-on: ubuntu-latest |
20 | 15 |
|
21 | 16 | steps:
|
22 |
| - - name: Mask apikey |
23 |
| - env: |
24 |
| - APIKEY: ${{ inputs.apiKey || secrets.APIKEY }} |
25 |
| - run: echo "::add-mask::${{env.APIKEY}}" |
26 |
| - |
27 |
| - - name: Checkout Code |
28 |
| - uses: actions/checkout@v3 |
29 |
| - |
30 |
| - - uses: maxim-lobanov/setup-xcode@v1 |
| 17 | + - name: Dispatch integration |
| 18 | + uses: peter-evans/repository-dispatch@v3 |
31 | 19 | with:
|
32 |
| - xcode-version: '15.0.1' |
| 20 | + token: ${{ secrets.IDENTUS_CI }} |
| 21 | + repository: hyperledger-identus/integration |
| 22 | + event-type: integration |
| 23 | + client-payload: '{"component": "sdk-swift", "release": false, "version": "${{ github.sha }}" }' |
33 | 24 |
|
34 |
| -# - name: Install SSH Key |
35 |
| -# uses: shimataro/[email protected] |
36 |
| -# with: |
37 |
| -# key: ${{ secrets.SSH_PRIVATE_KEY }} |
38 |
| -# known_hosts: github.com |
39 |
| -# |
40 |
| -# - name: Adding Known Hosts |
41 |
| -# run: ssh-keyscan -H github.com >> ~/.ssh/known_hosts |
| 25 | + integrate-release: |
| 26 | + if: startsWith(github.ref, 'refs/tags/') |
| 27 | + name: Integrate release |
| 28 | + runs-on: ubuntu-latest |
42 | 29 |
|
43 |
| - - name: Create properties file |
44 |
| - working-directory: E2E/e2eTests/Resources |
45 |
| - env: |
46 |
| - MEDIATOR_OOB_URL: ${{ inputs.mediatorOobUrl || vars.MEDIATOR_OOB_URL }} |
47 |
| - PRISM_AGENT_URL: ${{ inputs.prismAgentUrl || vars.PRISM_AGENT_URL }} |
48 |
| - PUBLISHED_DID: ${{ inputs.publishedDid || vars.PUBLISHED_DID }} |
49 |
| - JWT_SCHEMA_GUID: ${{ inputs.jwtSchemaGuid || vars.JWT_SCHEMA_GUID }} |
50 |
| - ANONCRED_DEFINITION_GUID: ${{ inputs.anoncredDefinitionGuid || vars.ANONCRED_DEFINITION_GUID }} |
51 |
| - APIKEY: ${{ inputs.apiKey || secrets.APIKEY }} |
52 |
| - run: | |
53 |
| - cat <<EOL > properties.plist |
54 |
| - <?xml version="1.0" encoding="UTF-8"?> |
55 |
| - <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
56 |
| - <plist version="1.0"> |
57 |
| - <dict> |
58 |
| - <key>MEDIATOR_OOB_URL</key> |
59 |
| - <string>${{env.MEDIATOR_OOB_URL}}</string> |
60 |
| - <key>PRISM_AGENT_URL</key> |
61 |
| - <string>${{env.PRISM_AGENT_URL}}</string> |
62 |
| - <key>APIKEY</key> |
63 |
| - <string>${{env.APIKEY}}</string> |
64 |
| - <key>PUBLISHED_DID</key> |
65 |
| - <string>${{env.PUBLISHED_DID}}</string> |
66 |
| - <key>JWT_SCHEMA_GUID</key> |
67 |
| - <string>${{env.JWT_SCHEMA_GUID}}</string> |
68 |
| - <key>ANONCRED_DEFINITION_GUID</key> |
69 |
| - <string>${{env.ANONCRED_DEFINITION_GUID}}</string> |
70 |
| - </dict> |
71 |
| - </plist> |
72 |
| - EOL |
73 |
| -
|
74 |
| - - name: Run tests |
75 |
| - working-directory: E2E |
76 |
| - env: |
77 |
| - GITHUB_ACTOR: ${{ github.actor }} |
78 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
79 |
| - run: xcodebuild build test -scheme "e2e-Package" -destination "platform=iOS Simulator,name=IPhone 14" -resultBundlePath e2eTests/Target/TestResults.xcresult -skipPackagePluginValidation | xcpretty |
80 |
| - |
81 |
| - - name: Publish tests results |
82 |
| - uses: kishikawakatsumi/[email protected] |
83 |
| - with: |
84 |
| - path: E2E/e2eTests/Target/TestResults.xcresult |
85 |
| - token: ${{ secrets.GITHUB_TOKEN }} |
86 |
| - show-code-coverage: true |
87 |
| - if: success() || failure() |
| 30 | + steps: |
| 31 | + - name: Get tag |
| 32 | + id: tag |
| 33 | + run: echo "name=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" |
88 | 34 |
|
89 |
| - - name: Publish report |
90 |
| - uses: actions/upload-artifact@v4 |
| 35 | + - name: Dispatch integration |
| 36 | + uses: peter-evans/repository-dispatch@v3 |
91 | 37 | with:
|
92 |
| - name: swift-report |
93 |
| - path: E2E/e2eTests/Target/report.html |
94 |
| - if-no-files-found: error |
| 38 | + token: ${{ secrets.IDENTUS_CI }} |
| 39 | + repository: hyperledger-identus/integration |
| 40 | + event-type: integration |
| 41 | + client-payload: '{"component": "sdk-swift", "release": true, "version": "${{ steps.tag.outputs.name }}" }' |
0 commit comments