Skip to content

ci: removed event_name == 'push' actions #44402

ci: removed event_name == 'push' actions

ci: removed event_name == 'push' actions #44402

name: Sequencer-Docker-Test
on:
workflow_dispatch:
push:
branches:
- main
- main-v[0-9].**
tags:
- v[0-9].**
pull_request:
env:
crate_triggers: "apollo_node,apollo_dashboard,apollo_integration_tests"
path_triggers: ".github/workflows/sequencer_docker-test.yml,scripts/*.py,scripts/system_tests/**/*.py"
path_triggers_exclude: "scripts/prod/**/*"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.job }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
check-docker-test-trigger:
runs-on: namespace-profile-small-ubuntu-24-04-amd64
outputs:
should_run: ${{ github.event_name == 'workflow_dispatch' && 'true' || steps.docker_check.outputs.should_run }}
steps:
- uses: actions/checkout@v4
if: github.event_name != 'workflow_dispatch'
with:
fetch-depth: 0
- uses: actions/setup-python@v5
if: github.event_name != 'workflow_dispatch'
id: setup-pypy
with:
python-version: "pypy3.9"
cache: "pip"
- run: pip install -r scripts/requirements.txt
if: github.event_name != 'workflow_dispatch'
- name: Check for docker-test-triggering changes
if: github.event_name != 'workflow_dispatch'
id: docker_check
run: |
echo "Checking if any docker-test-triggering crates were modified"
OUTPUT_FILE=$(mktemp)
python ./scripts/check_test_trigger.py --output_file $OUTPUT_FILE \
--commit_id ${{ github.event.pull_request.base.sha }} \
--crate_triggers ${{ env.crate_triggers }} \
--path_triggers ${{ env.path_triggers }} \
--path_triggers_exclude ${{ env.path_triggers_exclude }}
should_run=$(cat "$OUTPUT_FILE")
echo "Captured output: $should_run"
echo "should_run=$should_run" >> $GITHUB_OUTPUT
sequencer_docker_compose_test:
needs: check-docker-test-trigger
if: needs.check-docker-test-trigger.outputs.should_run == 'true'
runs-on: namespace-profile-2xlarge-ubuntu-24-04-amd64-local-builder
env:
MONITORING_ENABLED: false
SIMULATOR_RUN_FOREVER: false
FOLLOW_LOGS: false
SIMULATOR_TIMEOUT: 300
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run docker compose
run: ./deployments/monitoring/deploy_local_stack.sh up -d --build --yes
env:
COMPOSE_BAKE: true
# Getting the sequencer_simulator container id, then
# Invoking `docker wait $container_id`.
# docker wait will return the container exit_code.
- name: Wait for simulator results
working-directory: ./deployments/monitoring/local
timeout-minutes: 5
run: |
simulator_id=$(docker compose ps -q sequencer_simulator 2>/dev/null)
exit_code=$(docker wait $simulator_id)
if (( $exit_code == 0 )); then
echo "✅ Simulator test succeeded. exit_code=$exit_code"
else
echo "❌ Simulator test failed. exit_code=$exit_code"
exit $exit_code
fi
# Printing all services logs separately. Makes it more readable later.
- name: Print sequencer_node_setup logs
if: always()
working-directory: ./deployments/monitoring/local
run: docker compose logs sequencer_node_setup
- name: Print dummy_recorder logs
if: always()
working-directory: ./deployments/monitoring/local
run: docker compose logs dummy_recorder
- name: Print dummy_eth_to_strk_oracle logs
if: always()
working-directory: ./deployments/monitoring/local
run: docker compose logs dummy_eth_to_strk_oracle
- name: Print config_injector logs
if: always()
working-directory: ./deployments/monitoring/local
run: docker compose logs config_injector
- name: Print sequencer_node logs
if: always()
working-directory: ./deployments/monitoring/local
run: docker compose logs sequencer_node
- name: Print sequencer_simulator logs
if: always()
working-directory: ./deployments/monitoring/local
run: docker compose logs sequencer_simulator
# Shutting down all containers and cleaning volumes.
- name: Cleanup
if: always()
run: ./deployments/monitoring/deploy_local_stack.sh down -v