-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Create shell script to generate .env file for workflow - Add new workflow definition for tests
- Loading branch information
Showing
2 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: CI/CD | ||
name: Continuous Integration - SDK E2E | ||
|
||
on: | ||
workflow_dispatch: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
set -x | ||
set -o | ||
|
||
environment="$1" | ||
|
||
case "$environment" in | ||
"dev-mainnet") | ||
url="https://dev-mainnet.lw.iog.io" | ||
;; | ||
"dev-preprod") | ||
url="https://dev-preprod.lw.iog.io" | ||
;; | ||
"dev-preview") | ||
url="https://dev-preview.lw.iog.io" | ||
;; | ||
"staging-preprod") | ||
url="https://staging-preprod.lw.iog.io" | ||
;; | ||
*) | ||
echo "Invalid environment: $environment. Valid options are: dev-mainnet, dev-preprod, dev-preview, and staging-preprod" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# Construct the environment file content | ||
envFileContent=" | ||
# Logger | ||
LOGGER_MIN_SEVERITY=info | ||
# Key management setup - required by getWallet | ||
KEY_MANAGEMENT_PROVIDER=inMemory | ||
# Providers setup - required by getWallet | ||
ASSET_PROVIDER=http | ||
ASSET_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4000/\"}' | ||
HANDLE_PROVIDER=http | ||
HANDLE_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4011/\"}' | ||
NETWORK_INFO_PROVIDER=http | ||
NETWORK_INFO_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4000/\"}' | ||
REWARDS_PROVIDER=http | ||
REWARDS_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4000/\"}' | ||
TX_SUBMIT_PROVIDER=http | ||
TX_SUBMIT_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4000/\"}' | ||
UTXO_PROVIDER=http | ||
UTXO_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4000/\"}' | ||
STAKE_POOL_PROVIDER=http | ||
STAKE_POOL_PROVIDER_PARAMS='{\"baseUrl\":\"$url:4000/\"}' | ||
" | ||
|
||
# Write the environment file content to the specified file | ||
echo "$envFileContent" > .env |