Skip to content

Commit

Permalink
fix: update advanced testing pipeline to not execute tests that weren…
Browse files Browse the repository at this point in the history
…'t selected so they show skipped instead of skipping steps. (#1945)

* fix:update advanced testing pipeline to not execute tests that weren't selected so they show skipped instead of skipping steps.
* change upgrade test height to 225
Co-authored-by: lumtis <[email protected]>
  • Loading branch information
gzukel authored Mar 26, 2024
1 parent a225b9d commit 2b77e0b
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 12 deletions.
120 changes: 112 additions & 8 deletions .github/workflows/execute_advanced_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,60 +19,164 @@ on:
type: boolean
required: false
default: false
debug:
type: boolean
required: false
default: false

jobs:
e2e-admin-tests:
if: ${{ github.event.inputs.e2e-admin-tests == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
if: ${{ github.event.inputs.e2e-admin-tests == 'true' }}
uses: actions/checkout@v3

- name: Execute e2e-admin-tests
if: ${{ github.event.inputs.e2e-admin-tests == 'true' }}
shell: bash
run: |
make start-e2e-admin-test
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Orchestrator container is not currently running. Exiting..."
exit 1
fi
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
if [ "$current_status" == "docker-ps-error" ]; then
echo "***********************************"
echo "* *"
echo "* *"
echo "* TESTING COMPLETE *"
echo "* *"
echo "* *"
echo "***********************************"
docker logs $container_id || echo "no logs"
exit 0
else
echo "Testing in progress still...."
if [ "${{ github.event.inputs.e2e-upgrade-test }}" == "true" ]; then
docker logs $container_id || echo "no logs"
fi
fi
sleep 5
done
e2e-upgrade-test:
if: ${{ github.event.inputs.e2e-upgrade-test == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
if: ${{ github.event.inputs.e2e-upgrade-test == 'true' }}
uses: actions/checkout@v3

- name: Execute upgrade-test
if: ${{ github.event.inputs.e2e-upgrade-test == 'true' }}
shell: bash
run: |
make start-upgrade-test
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Orchestrator container is not currently running. Exiting..."
exit 1
fi
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
if [ "$current_status" == "docker-ps-error" ]; then
echo "***********************************"
echo "* *"
echo "* *"
echo "* TESTING COMPLETE *"
echo "* *"
echo "* *"
echo "***********************************"
docker logs $container_id || echo "no logs"
exit 0
else
echo "Testing in progress still...."
if [ "${{ github.event.inputs.e2e-upgrade-test }}" == "true" ]; then
docker logs $container_id || echo "no logs"
fi
fi
sleep 5
done
e2e-upgrade-test-light:
if: ${{ github.event.inputs.e2e-upgrade-test-light == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
if: ${{ github.event.inputs.e2e-upgrade-test-light == 'true' }}
uses: actions/checkout@v3

- name: Execute upgrade-test-light
if: ${{ github.event.inputs.e2e-upgrade-test-light == 'true' }}
shell: bash
run: |
make start-upgrade-test-light
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Orchestrator container is not currently running. Exiting..."
exit 1
fi
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
if [ "$current_status" == "docker-ps-error" ]; then
echo "***********************************"
echo "* *"
echo "* *"
echo "* TESTING COMPLETE *"
echo "* *"
echo "* *"
echo "***********************************"
docker logs $container_id || echo "no logs"
exit 0
else
echo "Testing in progress still...."
if [ "${{ github.event.inputs.e2e-upgrade-test }}" == "true" ]; then
docker logs $container_id || echo "no logs"
fi
fi
sleep 5
done
e2e-performance-test:
if: ${{ github.event.inputs.e2e-performance-test == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
if: ${{ github.event.inputs.e2e-performance-test == 'true' }}
uses: actions/checkout@v3

- name: Execute Performance Tests
if: ${{ github.event.inputs.e2e-performance-test == 'true' }}
shell: bash
run: |
make start-e2e-performance-test
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Orchestrator container is not currently running. Exiting..."
exit 1
fi
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
if [ "$current_status" == "docker-ps-error" ]; then
echo "***********************************"
echo "* *"
echo "* *"
echo "* TESTING COMPLETE *"
echo "* *"
echo "* *"
echo "***********************************"
docker logs $container_id || echo "no logs"
exit 0
else
echo "Testing in progress still...."
if [ "${{ github.event.inputs.e2e-upgrade-test }}" == "true" ]; then
docker logs $container_id || echo "no logs"
fi
fi
sleep 5
done
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* [1814](https://github.com/zeta-chain/node/pull/1814) - fix code coverage ignore for protobuf generated files

### CI
* [1945](https://github.com/zeta-chain/node/pull/1945) - update advanced testing pipeline to not execute tests that weren't selected so they show skipped instead of skipping steps.
* [1940](https://github.com/zeta-chain/node/pull/1940) - adjust release pipeline to be created as pre-release instead of latest
* [1867](https://github.com/zeta-chain/node/pull/1867) - default restore_type for full node docker-compose to snapshot instead of statesync for reliability.
* [1891](https://github.com/zeta-chain/node/pull/1891) - fix typo that was introduced to docker-compose and a typo in start.sh for the docker start script for full nodes.
Expand Down
4 changes: 2 additions & 2 deletions contrib/localnet/orchestrator/start-zetae2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ if [ "$OPTION" == "upgrade" ]; then

# Run the e2e tests, then restart zetaclientd at upgrade height and run the e2e tests again

# Fetch the height of the upgrade, default is 200, if arg3 is passed, use that value
UPGRADE_HEIGHT=${3:-200}
# Fetch the height of the upgrade, default is 225, if arg3 is passed, use that value
UPGRADE_HEIGHT=${3:-225}

# Run zetae2e, if the upgrade height is lower than 100, we use the setup-only flag
if [ "$UPGRADE_HEIGHT" -lt 100 ]; then
Expand Down
4 changes: 2 additions & 2 deletions contrib/localnet/scripts/start-zetacored.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ else
sleep 20
echo

# Fetch the height of the upgrade, default is 200, if arg3 is passed, use that value
UPGRADE_HEIGHT=${3:-200}
# Fetch the height of the upgrade, default is 225, if arg3 is passed, use that value
UPGRADE_HEIGHT=${3:-225}

# If this is the first node, create a governance proposal for upgrade
if [ $HOSTNAME = "zetacore0" ]
Expand Down

0 comments on commit 2b77e0b

Please sign in to comment.