Skip to content

Commit ddda769

Browse files
authored
E2e regression workflow add optional tags param (#1384)
1 parent 72aaae5 commit ddda769

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

.github/actions/test/e2e/action.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ inputs:
2424
description: 'Run only smoke tests'
2525
required: true
2626
default: 'false'
27+
TAGS:
28+
description: 'Tags'
29+
required: false
30+
default: ''
2731

2832
runs:
2933
using: 'composite'
@@ -48,11 +52,16 @@ runs:
4852
DISPLAY: ${{ inputs.DISPLAY }}
4953
BATCH: ${{ inputs.BATCH }}
5054
run: |
55+
commonTags="@Testnet and not @Pending"
56+
tagsToRun="'${commonTags}'"
5157
if [ "${{ inputs.SMOKE_ONLY }}" == "true" ]; then
52-
runCommand="yarn wdio run wdio.conf.${BROWSER}.ts --suite batch${BATCH} --cucumberOpts.tags='@Smoke and @Testnet and not @Pending'"
53-
else
54-
runCommand="yarn wdio run wdio.conf.${BROWSER}.ts --suite batch${BATCH} --cucumberOpts.tags='@Testnet and not @Pending'"
58+
tagsToRun="'@Smoke and ${tagsToRun}'"
59+
fi
60+
if [ "${{ inputs.TAGS }}" != "" ]; then
61+
tagsToRun="'${{ inputs.TAGS }} and ${tagsToRun}'"
5562
fi
63+
echo "Running tests with tags: ${tagsToRun}"
64+
runCommand="yarn wdio run wdio.conf.${BROWSER}.ts --suite batch${BATCH} --cucumberOpts.tags=${tagsToRun}"
5665
eval "$runCommand";
5766
5867
- name: Save dmesg logs

.github/workflows/e2e-tests-linux-split.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ on:
3939
description: 'Run only smoke tests'
4040
required: true
4141
default: false
42+
tags:
43+
type: string
44+
description: 'Tags(optional)'
45+
required: false
46+
default: ''
4247
cardano_mainnet_url:
4348
type: choice
4449
required: true
@@ -98,7 +103,7 @@ on:
98103
- live-preview.us-east-1.lw.iog.io
99104
- live-preview.us-east-2.lw.iog.io
100105

101-
run-name: "E2E | os: Linux | browser: ${{ github.event.inputs.browser || 'chrome' }} | network: ${{ github.event.inputs.network || 'preprod' }} | #${{ github.run_number }} | smoke only: ${{ github.event.inputs.smoke_only || 'false' }}"
106+
run-name: "E2E | os: Linux | browser: ${{ github.event.inputs.browser || 'chrome' }} | network: ${{ github.event.inputs.network || 'preprod' }} | #${{ github.run_number }} | tags: ${{ github.event.inputs.tags || '' }} | smoke only: ${{ github.event.inputs.smoke_only || 'false' }}"
102107

103108
env:
104109
BROWSER: ${{ github.event.inputs.browser || 'chrome' }}
@@ -141,13 +146,15 @@ jobs:
141146
echo "Network: ${{ github.event.inputs.network || 'preprod' }}"
142147
echo "Runner: ${{ github.event.inputs.runner || 'ubuntu-22.04' }}"
143148
echo "Smoke only: ${{ github.event.inputs.smoke_only || 'false' }}"
149+
echo "Tags(optional): ${{ github.event.inputs.tags || '' }}"
144150
echo "Cardano mainnet url: ${{ github.event.inputs.cardano_mainnet_url || 'dev-mainnet.lw.iog.io' }}"
145151
echo "Cardano preprod url: ${{ github.event.inputs.cardano_preprod_url || 'dev-preprod.lw.iog.io' }}"
146152
echo "Cardano preview url: ${{ github.event.inputs.cardano_preview_url || 'dev-preview.lw.iog.io' }}"
147153
echo "Build artifact name: ${{ env.BUILD_ARTIFACT_NAME }}"
148154
outputs:
149155
runner: ${{ github.event.inputs.runner || 'ubuntu-22.04' }}
150156
smoke_only: ${{ github.event.inputs.smoke_only || false }}
157+
tags: ${{ github.event.inputs.tags || '' }}
151158
build_exists: ${{ steps.check-build-exists.outputs.build_exists }}
152159

153160
build:
@@ -209,6 +216,7 @@ jobs:
209216
with:
210217
BATCH: ${{ matrix.batch }}
211218
SMOKE_ONLY: ${{ needs.setup.outputs.smoke_only }}
219+
TAGS: ${{ needs.setup.outputs.tags }}
212220
TEST_DAPP_URL: ${{ secrets.TEST_DAPP_URL }}
213221
WALLET_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }}
214222

@@ -235,6 +243,7 @@ jobs:
235243
browser=${BROWSER}
236244
platform=Linux
237245
smoke_only=${{ needs.setup.outputs.smoke_only }}
246+
tags=${{ needs.setup.outputs.tags }}
238247
cardano_mainnet_url=${CARDANO_MAINNET_URL}
239248
cardano_preprod_url=${CARDANO_PREPROD_URL}
240249
cardano_preview_url=${CARDANO_PREVIEW_URL}
@@ -258,14 +267,14 @@ jobs:
258267
- name: Add link to summary
259268
run: |
260269
echo "TEST RESULTS:"
261-
echo "https://${{ secrets.E2E_REPORTS_USER }}:${{ secrets.E2E_REPORTS_PASSWORD }}@${{ secrets.E2E_REPORTS_URL }}/all/linux/${{ env.BROWSER }}/${{ env.RUN }}/index.html | browser: ${{ env.BROWSER }} | network: ${{ env.NETWORK }} | platform: linux | smoke only: ${{ needs.setup.outputs.smoke_only }}" >> $GITHUB_STEP_SUMMARY
270+
echo "https://${{ secrets.E2E_REPORTS_USER }}:${{ secrets.E2E_REPORTS_PASSWORD }}@${{ secrets.E2E_REPORTS_URL }}/all/linux/${{ env.BROWSER }}/${{ env.RUN }}/index.html | browser: ${{ env.BROWSER }} | network: ${{ env.NETWORK }} | platform: linux | tags: ${{ needs.setup.outputs.tags }} | smoke only: ${{ needs.setup.outputs.smoke_only }}" >> $GITHUB_STEP_SUMMARY
262271
263272
- name: Slack Notification
264273
uses: rtCamp/action-slack-notify@v2.3.0
265274
env:
266275
SLACK_COLOR: "${{ contains(needs.*.result, 'failure') && 'failure' || 'good' }}"
267276
SLACK_ICON_EMOJI: ':lace:'
268-
SLACK_MESSAGE: 'https://${{ secrets.E2E_REPORTS_USER }}:${{ secrets.E2E_REPORTS_PASSWORD }}@${{ secrets.E2E_REPORTS_URL }}/all/linux/${{ env.BROWSER }}/${{ env.RUN }}/index.html | browser: ${{ env.BROWSER }} | network: ${{ env.NETWORK }} | platform: linux | smoke only: ${{ needs.setup.outputs.smoke_only }}'
277+
SLACK_MESSAGE: 'https://${{ secrets.E2E_REPORTS_USER }}:${{ secrets.E2E_REPORTS_PASSWORD }}@${{ secrets.E2E_REPORTS_URL }}/all/linux/${{ env.BROWSER }}/${{ env.RUN }}/index.html | browser: ${{ env.BROWSER }} | network: ${{ env.NETWORK }} | platform: linux | tags: ${{ needs.setup.outputs.tags }} | smoke only: ${{ needs.setup.outputs.smoke_only }}'
269278
SLACK_TITLE: 'Test automation results :rocket:'
270279
SLACK_USERNAME: lace-qa-bot
271280
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

0 commit comments

Comments
 (0)