Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update advanced testing pipeline to not execute tests that weren't selected so they show skipped instead of skipping steps. #1945

Merged
merged 12 commits into from
Mar 26, 2024
112 changes: 104 additions & 8 deletions .github/workflows/execute_advanced_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,57 +22,153 @@ on:

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

# Find the container ID of the orchestrator container by its image name
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
echo "get current status"
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
echo "current status: ${current_status}"
if [ "$current_status" == "docker-ps-error" ]; then
echo "no current container get logs"
docker logs $container_id || echo "no logs"
echo "-----------------------------------"
exit 0
else
echo "Orchestrator container is still running..."
docker logs $container_id || echo "no logs"
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

# Find the container ID of the orchestrator container by its image name
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
echo "get current status"
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
echo "current status: ${current_status}"
if [ "$current_status" == "docker-ps-error" ]; then
echo "no current container get logs"
docker logs $container_id || echo "no logs"
echo "-----------------------------------"
exit 0
else
echo "Orchestrator container is still running..."
docker logs $container_id || echo "no logs"
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

# Find the container ID of the orchestrator container by its image name
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
echo "get current status"
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
echo "current status: ${current_status}"
if [ "$current_status" == "docker-ps-error" ]; then
echo "no current container get logs"
docker logs $container_id || echo "no logs"
echo "-----------------------------------"
exit 0
else
echo "Orchestrator container is still running..."
docker logs $container_id || echo "no logs"
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

# Find the container ID of the orchestrator container by its image name
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
echo "get current status"
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
echo "current status: ${current_status}"
if [ "$current_status" == "docker-ps-error" ]; then
echo "no current container get logs"
docker logs $container_id || echo "no logs"
echo "-----------------------------------"
exit 0
else
echo "Orchestrator container is still running..."
docker logs $container_id || echo "no logs"
fi
sleep 5
done
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,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
Loading