Skip to content

Commit

Permalink
Merge branch 'develop' into auto-2.0-send-custom-telem
Browse files Browse the repository at this point in the history
  • Loading branch information
JonWong203 authored Sep 11, 2023
2 parents f8ab92a + 8cba02a commit a9aea4e
Show file tree
Hide file tree
Showing 337 changed files with 13,127 additions and 4,923 deletions.
16 changes: 15 additions & 1 deletion .github/actions/setup-postgres/wait-for-healthy-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,24 @@
RETRIES=10

until [ $RETRIES -eq 0 ]; do
if docker compose ps postgres --status running --format json | jq >/dev/null -e 'if (.[0].Health == "healthy") then true else false end'; then
DOCKER_OUTPUT=$(docker compose ps postgres --status running --format json)
JSON_TYPE=$(echo "$DOCKER_OUTPUT" | jq -r 'type')

if [ "$JSON_TYPE" == "array" ]; then
HEALTH_STATUS=$(echo "$DOCKER_OUTPUT" | jq -r '.[0].Health')
elif [ "$JSON_TYPE" == "object" ]; then
HEALTH_STATUS=$(echo "$DOCKER_OUTPUT" | jq -r '.Health')
else
HEALTH_STATUS="Unknown JSON type: $JSON_TYPE"
fi

echo "postgres health status: $HEALTH_STATUS"
if [ "$HEALTH_STATUS" == "healthy" ]; then
exit 0
fi

echo "Waiting for postgres server, $((RETRIES--)) remaining attempts..."
sleep 2
done

exit 1
4 changes: 2 additions & 2 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
if: needs.init.outputs.on_trigger_lint == 'true'
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
version: v1.53.3
version: v1.54.2
only-new-issues: ${{ github.event.schedule == '' }} # show only new issues, unless it's a scheduled run
args: --out-format checkstyle:golangci-lint-report.xml
- name: Print lint report artifact
Expand Down Expand Up @@ -289,7 +289,7 @@ jobs:
-gh_sha=$GITHUB_SHA \
-gh_event_path=$GITHUB_EVENT_PATH \
-command=./tools/bin/go_core_tests \
`ls -R ./artifacts/go_core_tests*/output-short.txt`
`ls -R ./artifacts/go_core_tests*/output.txt`
- name: Store logs artifacts
if: always()
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/integration-staging-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: E2E Functions staging tests

on:
# TODO: enable when env will be stable
# schedule:
# - cron: "0 0 * * *"
workflow_dispatch:
inputs:
network:
description: Blockchain network (testnet)
type: choice
default: "MUMBAI"
options:
- "MUMBAI"
test_type:
description: Test type
type: choice
default: "mumbai_functions_soak_test_real"
options:
- "mumbai_functions_soak_test_http"
- "mumbai_functions_stress_test_http"
- "mumbai_functions_soak_test_only_secrets"
- "mumbai_functions_stress_test_only_secrets"
- "mumbai_functions_soak_test_real"
- "mumbai_functions_stress_test_real"
# TODO: disabled, need GATI access
# - "gateway_secrets_set_soak_test"
# - "gateway_secrets_list_soak_test"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
e2e-soak-test:
environment: sdlc
runs-on: ubuntu20.04-8cores-32GB
permissions:
contents: read
id-token: write
env:
LOKI_URL: ${{ secrets.LOKI_URL }}
LOKI_TOKEN: ${{ secrets.LOKI_TOKEN }}

SELECTED_NETWORKS: ${{ inputs.network }}
SELECTED_TEST: ${{ inputs.test_type }}
MUMBAI_URLS: ${{ secrets.FUNCTIONS_STAGING_MUMBAI_URLS }}
MUMBAI_KEYS: ${{ secrets.FUNCTIONS_STAGING_MUMBAI_KEYS }}

WASP_LOG_LEVEL: info
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run E2E soak tests
run: |
cd integration-tests/load/functions
if [[ $SELECTED_TEST == mumbai_functions* ]]; then
go test -v -timeout 6h -run TestFunctionsLoad/$SELECTED_TEST
elif [[ $SELECTED_TEST == gateway* ]]; then
go test -v -timeout 6h -run TestGatewayLoad/$SELECTED_TEST
fi
Loading

0 comments on commit a9aea4e

Please sign in to comment.