|
| 1 | +name: smoke |
| 2 | +description: Execute e2e smoke tests |
| 3 | + |
| 4 | +inputs: |
| 5 | + WALLET_PASSWORD: |
| 6 | + description: 'Test wallet password' |
| 7 | + required: true |
| 8 | + |
| 9 | + TEST_DAPP_URL: |
| 10 | + description: 'Test DApp Url' |
| 11 | + required: true |
| 12 | + |
| 13 | + GITHUB_TOKEN: |
| 14 | + description: 'Github token' |
| 15 | + required: true |
| 16 | + |
| 17 | + E2E_AWS_ACCESS_KEY_ID: |
| 18 | + description: 'AWS access key id' |
| 19 | + required: true |
| 20 | + |
| 21 | + E2E_AWS_SECRET_ACCESS_KEY: |
| 22 | + description: 'AWS secret access key' |
| 23 | + required: true |
| 24 | + |
| 25 | + E2E_REPORTS_USER: |
| 26 | + description: 'E2E reports user' |
| 27 | + required: true |
| 28 | + |
| 29 | + E2E_REPORTS_PASSWORD: |
| 30 | + description: 'E2E reports password' |
| 31 | + required: true |
| 32 | + |
| 33 | + E2E_REPORTS_URL: |
| 34 | + description: 'E2E reports url' |
| 35 | + required: true |
| 36 | + |
| 37 | + RUN: |
| 38 | + description: 'Runner number' |
| 39 | + required: true |
| 40 | + |
| 41 | + BRANCH: |
| 42 | + description: 'Branch' |
| 43 | + required: true |
| 44 | + |
| 45 | + TAGS: |
| 46 | + description: 'tags' |
| 47 | + required: false |
| 48 | + default: '@Smoke and @Testnet' |
| 49 | + |
| 50 | + BROWSER: |
| 51 | + description: 'browser' |
| 52 | + required: false |
| 53 | + default: 'chrome' |
| 54 | + |
| 55 | + DISPLAY: |
| 56 | + description: '' |
| 57 | + required: false |
| 58 | + default: ':99.0' |
| 59 | + |
| 60 | +runs: |
| 61 | + using: 'composite' |
| 62 | + |
| 63 | + steps: |
| 64 | + - name: Start XVFB |
| 65 | + shell: bash |
| 66 | + env: |
| 67 | + DISPLAY: ${{ inputs.DISPLAY }} |
| 68 | + run: | |
| 69 | + Xvfb :99 & |
| 70 | +
|
| 71 | + - name: Execute e2e smoke tests |
| 72 | + shell: bash |
| 73 | + id: e2e-tests |
| 74 | + working-directory: ./packages/e2e-tests |
| 75 | + env: |
| 76 | + WALLET_1_PASSWORD: ${{ inputs.WALLET_PASSWORD }} |
| 77 | + TEST_DAPP_URL: ${{ inputs.TEST_DAPP_URL }} |
| 78 | + TAGS: ${{ inputs.TAGS }} |
| 79 | + BROWSER: ${{ inputs.BROWSER }} |
| 80 | + RUN: ${{ inputs.RUN }} |
| 81 | + DISPLAY: ${{ inputs.DISPLAY }} |
| 82 | + BRANCH: ${{ inputs.BRANCH }} |
| 83 | + run: yarn wdio run wdio.conf.${{ inputs.BROWSER }}.ts --cucumberOpts.tags="@Smoke and not @Pending" |
| 84 | + |
| 85 | + - name: Create allure properties |
| 86 | + shell: bash |
| 87 | + if: always() |
| 88 | + working-directory: ./packages/e2e-tests/reports/allure/results |
| 89 | + run: | |
| 90 | + echo " |
| 91 | + branch=${{ inputs.BRANCH }} |
| 92 | + browser=${{ inputs.BROWSER }} |
| 93 | + tags=${{ inputs.TAGS }} |
| 94 | + platform=Linux |
| 95 | + " > environment.properties |
| 96 | +
|
| 97 | + - name: Publish allure report to S3 |
| 98 | + |
| 99 | + if: always() |
| 100 | + env: |
| 101 | + GITHUB_AUTH_TOKEN: ${{ inputs.GITHUB_TOKEN }} |
| 102 | + AWS_ACCESS_KEY_ID: ${{ inputs.E2E_AWS_ACCESS_KEY_ID }} |
| 103 | + AWS_SECRET_ACCESS_KEY: ${{ inputs.E2E_AWS_SECRET_ACCESS_KEY }} |
| 104 | + with: |
| 105 | + storageType: s3 |
| 106 | + resultsGlob: './packages/e2e-tests/reports/allure/results' |
| 107 | + bucket: lace-e2e-test-results |
| 108 | + prefix: 'smoke/linux/${{ inputs.BROWSER }}/${{ inputs.RUN }}' |
| 109 | + copyLatest: true |
| 110 | + ignoreMissingResults: true |
| 111 | + updatePr: comment |
| 112 | + baseUrl: 'https://${{ inputs.E2E_REPORTS_USER }}:${{ inputs.E2E_REPORTS_PASSWORD }}@${{ inputs.E2E_REPORTS_URL }}' |
| 113 | + |
| 114 | + - name: Publish artifacts (logs, reports, screenshots) |
| 115 | + uses: actions/upload-artifact@v4 |
| 116 | + if: always() |
| 117 | + with: |
| 118 | + name: test-artifacts |
| 119 | + path: | |
| 120 | + ./packages/e2e-tests/screenshots |
| 121 | + ./packages/e2e-tests/logs |
| 122 | + ./packages/e2e-tests/reports |
| 123 | + retention-days: 5 |
0 commit comments