Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4c9cd64

Browse files
committedJun 14, 2024
Add SDK E2E Tests
- Create shell script to generate .env file for workflow - Add new workflow definition for tests
1 parent d582c23 commit 4c9cd64

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed
 

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI/CD
1+
name: Continuous Integration - SDK E2E
22

33
on:
44
workflow_dispatch:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
set -x
3+
set -o
4+
5+
environment="$1"
6+
7+
case "$environment" in
8+
"dev-mainnet")
9+
url="https://dev-mainnet.lw.iog.io"
10+
;;
11+
"dev-preprod")
12+
url="https://dev-preprod.lw.iog.io"
13+
;;
14+
"dev-preview")
15+
url="https://dev-preview.lw.iog.io"
16+
;;
17+
"staging-preprod")
18+
url="https://staging-preprod.lw.iog.io"
19+
;;
20+
*)
21+
echo "Invalid environment: $environment. Valid options are: dev-mainnet, dev-preprod, dev-preview, and staging-preprod"
22+
exit 1
23+
;;
24+
esac
25+
26+
# Construct the environment file content
27+
envFileContent="
28+
# Logger
29+
LOGGER_MIN_SEVERITY=info
30+
31+
# Key management setup - required by getWallet
32+
KEY_MANAGEMENT_PROVIDER=inMemory
33+
34+
# Providers setup - required by getWallet
35+
ASSET_PROVIDER=http
36+
ASSET_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4000/\"}'
37+
HANDLE_PROVIDER=http
38+
HANDLE_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4011/\"}'
39+
NETWORK_INFO_PROVIDER=http
40+
NETWORK_INFO_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4000/\"}'
41+
REWARDS_PROVIDER=http
42+
REWARDS_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4000/\"}'
43+
TX_SUBMIT_PROVIDER=http
44+
TX_SUBMIT_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4000/\"}'
45+
UTXO_PROVIDER=http
46+
UTXO_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4000/\"}'
47+
STAKE_POOL_PROVIDER=http
48+
STAKE_POOL_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4000/\"}'
49+
"
50+
51+
# Write the environment file content to the specified file
52+
echo "$envFileContent" > .env

0 commit comments

Comments
 (0)
Please sign in to comment.