Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

fix: extract validator pubkeys from genesis #2065

fix: extract validator pubkeys from genesis

fix: extract validator pubkeys from genesis #2065

name: Docker build and push
on:
push:
branches: [main, debug/**]
pull_request:
branches: [main]
release:
types: [created]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
docker:
uses: ./.github/workflows/docker_utils.yml
secrets: inherit
broadcast_channels:
uses: ./.github/workflows/docker_utils.yml
secrets: inherit
with:
features: broadcast_via_channels
network:
uses: ./.github/workflows/docker_utils.yml
secrets: inherit
with:
features: "network"
docker_e2e:
runs-on: ubuntu-latest-16-core
needs: docker
if: ${{ github.event_name == 'pull_request' }}
env:
EXPECTED_IMAGE_NAME: ghcr.io/${{ github.repository }}:main
steps:
- name: Set environment
run: |
# It's fine to assume a single tag. Our tagging strategy follows a 1:1 mapping of image:tag
tags=${{ needs.docker.outputs.tags }}
echo "docker_tag=${tags#*:}" >> $GITHUB_ENV
shell: bash
- name: Setup image to match docker-compose file
run: |
docker pull ghcr.io/${{ github.repository}}:${{ env.docker_tag }}
docker tag ghcr.io/${{ github.repository}}:${{ env.docker_tag }} ${{ env.EXPECTED_IMAGE_NAME }}
- name: Checkout
uses: actions/checkout@v3
- name: Running TCE cluster
run: |
docker compose -f tools/docker-compose.yml up -d peer
- name: Checking for healthy cluster
uses: nick-fields/[email protected]
with:
retry_on: error
max_attempts: 5
retry_wait_seconds: 40
timeout_minutes: 10
on_retry_command: docker inspect --format "{{ .Id }} {{ .State.Health.Status }}" $(docker compose -f tools/docker-compose.yml ps -aq peer boot) | grep "healthy$" | cut -d ' ' -f 1 | xargs -I{} sh -c 'echo "\nLogs for => {}\n" && docker logs {}'
command: |
EXPECTED=$(docker compose -f tools/docker-compose.yml ps -aq peer boot|wc -l)
COUNT=$(docker inspect --format "{{.State.Health.Status }}" $(docker compose -f tools/docker-compose.yml ps -aq peer boot)|grep "^healthy$"|wc -l)
echo "Number of Healthy containers: $COUNT"
if [[ $COUNT -eq $EXPECTED ]]; then
echo "All expected containers healthy"
exit 0
else
echo "Unhealthy containers"
docker compose -f tools/docker-compose.yml ps -a peer boot
exit 1
fi
- name: Run the check
run: |
docker compose -f tools/docker-compose.yml ps
docker compose -f tools/docker-compose.yml run --no-deps check
frontend-erc20-e2e:
runs-on: ubuntu-latest
needs: docker
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Set environment
run: |
# It's fine to assume a single tag. Our tagging strategy follows a 1:1 mapping of image:tag
tags=${{ needs.docker.outputs.tags }}
echo "docker_tag=${tags#*:}" >> $GITHUB_ENV
shell: bash
- uses: convictional/[email protected]
with:
owner: topos-protocol
repo: e2e-tests
github_token: ${{ secrets.ROBOT_PAT_TRIGGER_E2E_WORKFLOWS }}
workflow_file_name: frontend:erc20-messaging.yml
ref: main
wait_interval: 60
client_payload: '{ "topos-docker-tag": "${{ env.docker_tag }}" }'