Skip to content

Commit 5efe232

Browse files
committed
test: add option to choose target cluster for deployed environments e2e tests
1 parent 8ebe351 commit 5efe232

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed

.github/workflows/test-deploy-e2e.yaml

+15-6
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,20 @@ on:
99
required: true
1010
default: 'dev-preprod'
1111
options:
12-
- live-preprod
13-
- live-preview
14-
- dev-preprod
15-
- dev-preview
16-
- staging-preprod
12+
- live-preprod
13+
- live-preview
14+
- dev-preprod
15+
- dev-preview
16+
- staging-preprod
17+
cluster:
18+
description: 'Specific cluster to run e2e tests against'
19+
type: choice
20+
required: true
21+
default: 'any'
22+
options:
23+
- any
24+
- eu-central-1
25+
- us-east-2
1726

1827
env:
1928
TL_DEPTH: ${{ github.event.pull_request.head.repo.fork && '0' || fromJson(vars.TL_DEPTH) }}
@@ -33,7 +42,7 @@ jobs:
3342
working-directory: ./packages/e2e/
3443
run: |
3544
if [[ "${{ inputs.environment }}" == *"preprod"* ]]; then networkMagic=1; else networkMagic=2; fi
36-
./src/scripts/generate-dotenv.sh ${{ inputs.environment }}
45+
./src/scripts/generate-dotenv.sh ${{ inputs.environment }} ${{ inputs.cluster }}
3746
echo "KEY_MANAGEMENT_PARAMS='$(jq --argjson networkMagic $networkMagic --arg mnemonic "${{ secrets.MNEMONIC }}" <<< '{"bip32Ed25519": "Sodium", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 0}, "passphrase":"some_passphrase","mnemonic":"mnemonics"}' '.mnemonic=$mnemonic | .chainId.networkMagic=$networkMagic')'" >> .env
3847

3948
- name: 🧰 Setup Node.js

packages/e2e/src/scripts/generate-dotenv.sh

+14-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,20 @@
22
set -x
33
set -o
44

5-
environment="$1"
5+
case $2 in
6+
any)
7+
environment="$1"
8+
;;
9+
*)
10+
environment="$1.$2"
11+
;;
12+
esac
13+
14+
echo environment
15+
echo $environment
16+
echo environment
17+
18+
exit 1
619

720
url="https://${environment}.lw.iog.io"
821

0 commit comments

Comments
 (0)