-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into test-crib-4
- Loading branch information
Showing
394 changed files
with
56,178 additions
and
10,326 deletions.
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
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
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
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
130 changes: 130 additions & 0 deletions
130
.github/actions/setup-create-base64-config-live-testnets/action.yml
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,130 @@ | ||
name: Create Base64 Config | ||
description: A composite action that creates a base64-encoded config to be used by integration tests | ||
|
||
inputs: | ||
runId: | ||
description: The run id | ||
testLogCollect: | ||
description: Whether to always collect logs, even for passing tests | ||
default: "false" | ||
chainlinkImage: | ||
description: The chainlink image to use | ||
default: "public.ecr.aws/chainlink/chainlink" | ||
chainlinkVersion: | ||
description: The git commit sha to use for the image tag | ||
pyroscopeServer: | ||
description: URL of Pyroscope server | ||
pyroscopeEnvironment: | ||
description: Name of Pyroscope environment | ||
pyroscopeKey: | ||
description: Pyroscope server key | ||
lokiEndpoint: | ||
description: Loki push endpoint | ||
lokiTenantId: | ||
description: Loki tenant id | ||
lokiBasicAuth: | ||
description: Loki basic auth | ||
logstreamLogTargets: | ||
description: Where to send logs (e.g. file, loki) | ||
grafanaUrl: | ||
description: Grafana URL | ||
grafanaDashboardUrl: | ||
description: Grafana dashboard URL | ||
network: | ||
description: Network to run tests on | ||
httpEndpoints: | ||
description: HTTP endpoints to use for network | ||
wsEndpoints: | ||
description: WS endpoints to use for network | ||
fundingKeys: | ||
description: Funding keys to use for network | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Prepare Base64 TOML override | ||
shell: bash | ||
id: base64-config-override | ||
env: | ||
RUN_ID: ${{ inputs.runId }} | ||
PYROSCOPE_SERVER: ${{ inputs.pyroscopeServer }} | ||
PYROSCOPE_ENVIRONMENT: ${{ inputs.pyroscopeEnvironment }} | ||
PYROSCOPE_KEY: ${{ inputs.pyroscopeKey }} | ||
CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }} | ||
CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }} | ||
LOKI_ENDPOINT: ${{ inputs.lokiEndpoint }} | ||
LOKI_TENANT_ID: ${{ inputs.lokiTenantId }} | ||
LOKI_BASIC_AUTH: ${{ inputs.lokiBasicAuth }} | ||
LOGSTREAM_LOG_TARGETS: ${{ inputs.logstreamLogTargets }} | ||
GRAFANA_URL: ${{ inputs.grafanaUrl }} | ||
GRAFANA_DASHBOARD_URL: ${{ inputs.grafanaDashboardUrl }} | ||
NETWORK: ${{ inputs.network }} | ||
HTTP_ENDPOINTS: ${{ inputs.httpEndpoints }} | ||
WS_ENDPOINTS: ${{ inputs.wsEndpoints }} | ||
FUNDING_KEYS: ${{ inputs.fundingKeys }} | ||
run: | | ||
convert_to_toml_array() { | ||
local IFS=',' | ||
local input_array=($1) | ||
local toml_array_format="[" | ||
for element in "${input_array[@]}"; do | ||
toml_array_format+="\"$element\"," | ||
done | ||
toml_array_format="${toml_array_format%,}]" | ||
echo "$toml_array_format" | ||
} | ||
if [ -n "$PYROSCOPE_SERVER" ]; then | ||
pyroscope_enabled=true | ||
else | ||
pyroscope_enabled=false | ||
fi | ||
cat << EOF > config.toml | ||
[Common] | ||
chainlink_node_funding=0.5 | ||
[ChainlinkImage] | ||
image="$CHAINLINK_IMAGE" | ||
version="$CHAINLINK_VERSION" | ||
[Pyroscope] | ||
enabled=$pyroscope_enabled | ||
server_url="$PYROSCOPE_SERVER" | ||
environment="$PYROSCOPE_ENVIRONMENT" | ||
key="$PYROSCOPE_KEY" | ||
[Logging] | ||
run_id="$RUN_ID" | ||
[Logging.LogStream] | ||
log_targets=$(convert_to_toml_array "$LOGSTREAM_LOG_TARGETS") | ||
[Logging.Loki] | ||
tenant_id="$LOKI_TENANT_ID" | ||
endpoint="$LOKI_URL" | ||
basic_auth="$LOKI_BASIC_AUTH" | ||
[Logging.Grafana] | ||
base_url="$GRAFANA_URL" | ||
dashboard_url="$GRAFANA_DASHBOARD_URL" | ||
[Network] | ||
selected_networks=["$NETWORK"] | ||
[Network.RpcHttpUrls] | ||
"$NETWORK" = $(convert_to_toml_array "$HTTP_ENDPOINTS") | ||
[Network.RpcWsUrls] | ||
"$NETWORK" = $(convert_to_toml_array "$WS_ENDPOINTS") | ||
[Network.WalletKeys] | ||
"$NETWORK" = $(convert_to_toml_array "$FUNDING_KEYS") | ||
EOF | ||
BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) | ||
echo ::add-mask::$BASE64_CONFIG_OVERRIDE | ||
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV | ||
touch .root_dir |
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,120 @@ | ||
name: Create Base64 Config | ||
description: A composite action that creates a base64-encoded config to be used by integration tests | ||
|
||
inputs: | ||
runId: | ||
description: The run id | ||
testLogCollect: | ||
description: Whether to always collect logs, even for passing tests | ||
default: "false" | ||
selectedNetworks: | ||
description: The networks to run tests against | ||
chainlinkImage: | ||
description: The chainlink image to use | ||
default: "public.ecr.aws/chainlink/chainlink" | ||
chainlinkVersion: | ||
description: The git commit sha to use for the image tag | ||
pyroscopeServer: | ||
description: URL of Pyroscope server | ||
pyroscopeEnvironment: | ||
description: Name of Pyroscope environment | ||
pyroscopeKey: | ||
description: Pyroscope server key | ||
lokiEndpoint: | ||
description: Loki push endpoint | ||
lokiTenantId: | ||
description: Loki tenant id | ||
lokiBasicAuth: | ||
description: Loki basic auth | ||
logstreamLogTargets: | ||
description: Where to send logs (e.g. file, loki) | ||
grafanaUrl: | ||
description: Grafana URL | ||
grafanaDashboardUrl: | ||
description: Grafana dashboard URL | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Prepare Base64 TOML override | ||
shell: bash | ||
id: base64-config-override | ||
env: | ||
RUN_ID: ${{ inputs.runId }} | ||
TEST_LOG_COLLECT: ${{ inputs.testLogCollect }} | ||
SELECTED_NETWORKS: ${{ inputs.selectedNetworks }} | ||
PYROSCOPE_SERVER: ${{ inputs.pyroscopeServer }} | ||
PYROSCOPE_ENVIRONMENT: ${{ inputs.pyroscopeEnvironment }} | ||
PYROSCOPE_KEY: ${{ inputs.pyroscopeKey }} | ||
CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }} | ||
CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }} | ||
LOKI_ENDPOINT: ${{ inputs.lokiEndpoint }} | ||
LOKI_TENANT_ID: ${{ inputs.lokiTenantId }} | ||
LOKI_BASIC_AUTH: ${{ inputs.lokiBasicAuth }} | ||
LOGSTREAM_LOG_TARGETS: ${{ inputs.logstreamLogTargets }} | ||
GRAFANA_URL: ${{ inputs.grafanaUrl }} | ||
GRAFANA_DASHBOARD_URL: ${{ inputs.grafanaDashboardUrl }} | ||
run: | | ||
echo ::add-mask::$CHAINLINK_IMAGE | ||
function convert_to_toml_array() { | ||
local IFS=',' | ||
local input_array=($1) | ||
local toml_array_format="[" | ||
for element in "${input_array[@]}"; do | ||
toml_array_format+="\"$element\"," | ||
done | ||
toml_array_format="${toml_array_format%,}]" | ||
echo "$toml_array_format" | ||
} | ||
selected_networks=$(convert_to_toml_array "$SELECTED_NETWORKS") | ||
log_targets=$(convert_to_toml_array "$LOGSTREAM_LOG_TARGETS") | ||
if [ -n "$PYROSCOPE_SERVER" ]; then | ||
pyroscope_enabled=true | ||
else | ||
pyroscope_enabled=false | ||
fi | ||
if [ -n "$TEST_LOG_COLLECT" ]; then | ||
test_log_collect=true | ||
else | ||
test_log_collect=false | ||
fi | ||
cat << EOF > config.toml | ||
[Network] | ||
selected_networks=$selected_networks | ||
[ChainlinkImage] | ||
image="$CHAINLINK_IMAGE" | ||
version="$CHAINLINK_VERSION" | ||
[Pyroscope] | ||
enabled=$pyroscope_enabled | ||
server_url="$PYROSCOPE_SERVER" | ||
environment="$PYROSCOPE_ENVIRONMENT" | ||
key="$PYROSCOPE_KEY" | ||
[Logging] | ||
test_log_collect=$test_log_collect | ||
run_id="$RUN_ID" | ||
[Logging.LogStream] | ||
log_targets=$log_targets | ||
[Logging.Loki] | ||
tenant_id="$LOKI_TENANT_ID" | ||
endpoint="$LOKI_ENDPOINT" | ||
basic_auth="$LOKI_BASIC_AUTH" | ||
[Logging.Grafana] | ||
base_url="$GRAFANA_URL" | ||
dashboard_url="$GRAFANA_DASHBOARD_URL" | ||
EOF | ||
BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) | ||
echo ::add-mask::$BASE64_CONFIG_OVERRIDE | ||
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV |
61 changes: 61 additions & 0 deletions
61
.github/actions/setup-create-base64-upgrade-config/action.yml
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,61 @@ | ||
name: Create Base64 Upgrade Config | ||
description: A composite action that creates a base64-encoded config to be used by Chainlink version upgrade tests | ||
|
||
inputs: | ||
selectedNetworks: | ||
description: The networks to run tests against | ||
chainlinkImage: | ||
description: The chainlink image to upgrade from | ||
default: "public.ecr.aws/chainlink/chainlink" | ||
chainlinkVersion: | ||
description: The git commit sha to use for the image tag | ||
upgradeImage: | ||
description: The chainlink image to upgrade to | ||
default: "public.ecr.aws/chainlink/chainlink" | ||
upgradeVersion: | ||
description: The git commit sha to use for the image tag | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Prepare Base64 TOML override | ||
shell: bash | ||
id: base64-config-override | ||
env: | ||
SELECTED_NETWORKS: ${{ inputs.selectedNetworks }} | ||
CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }} | ||
CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }} | ||
UPGRADE_IMAGE: ${{ inputs.upgradeImage }} | ||
UPGRADE_VERSION: ${{ inputs.upgradeVersion }} | ||
run: | | ||
function convert_to_toml_array() { | ||
local IFS=',' | ||
local input_array=($1) | ||
local toml_array_format="[" | ||
for element in "${input_array[@]}"; do | ||
toml_array_format+="\"$element\"," | ||
done | ||
toml_array_format="${toml_array_format%,}]" | ||
echo "$toml_array_format" | ||
} | ||
selected_networks=$(convert_to_toml_array "$SELECTED_NETWORKS") | ||
cat << EOF > config.toml | ||
[Network] | ||
selected_networks=$selected_networks | ||
[ChainlinkImage] | ||
image="$CHAINLINK_IMAGE" | ||
version="$CHAINLINK_VERSION" | ||
[ChainlinkUpgradeImage] | ||
image="$UPGRADE_IMAGE" | ||
version="$UPGRADE_VERSION" | ||
EOF | ||
BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) | ||
echo ::add-mask::$BASE64_CONFIG_OVERRIDE | ||
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV |
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
Oops, something went wrong.