test(coprocessor): tx-sender tests look broken #4303
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: gateway-contracts-mock-deployment | |
| on: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| check-changes: | |
| name: gateway-contracts-mock-deployment/check-changes | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: 'read' # Required to checkout repository code | |
| outputs: | |
| changes-gw-contracts: ${{ steps.filter.outputs.gw-contracts }} | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: 'false' | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: filter | |
| with: | |
| filters: | | |
| gw-contracts: | |
| - .github/workflows/gateway-contracts-mock-deployment.yml | |
| - gateway-contracts/** | |
| deploy: | |
| needs: check-changes | |
| if: ${{ needs.check-changes.outputs.changes-gw-contracts == 'true' }} | |
| name: gateway-contracts-mock-deployment/deploy (bpr) | |
| permissions: | |
| contents: 'read' # Required to checkout repository code | |
| checks: 'write' # Required to create GitHub checks for test results | |
| packages: 'read' # Required to read GitHub packages/container registry | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: 'false' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 | |
| - name: Login to Docker Registry | |
| uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and start Docker services | |
| working-directory: gateway-contracts | |
| run: | | |
| make docker-compose-build | |
| make docker-compose-up | |
| - name: Check mock smart contract deployment | |
| working-directory: gateway-contracts | |
| run: | | |
| ## Check Mock contracts deployment | |
| timeout 300s bash -c 'while docker ps --filter "name=deploy-gateway-mock-contracts" --format "{{.Status}}" | grep -q "Up"; do sleep 5; done' | |
| docker compose logs deploy-gateway-mock-contracts > mock_contracts_deployment_logs.txt | |
| EXIT_CODE_SC=$(docker inspect --format='{{.State.ExitCode}}' deploy-gateway-mock-contracts) | |
| # display logs for debugging | |
| # cat mock_contracts_deployment_logs.txt | |
| if [ "$EXIT_CODE_SC" -ne 0 ]; then | |
| echo "Mock contract deployment failed with exit code $EXIT_CODE_SC" | |
| exit 1 | |
| elif ! grep -q "Mock contract deployment done!" mock_contracts_deployment_logs.txt; then | |
| echo "Mock contract deployment did not complete successfully - 'Mock contract deployment done!' message not found in logs" | |
| exit 1 | |
| else | |
| echo "Mock contract deployment completed successfully with expected completion message" | |
| fi | |
| - name: Clean up | |
| working-directory: gateway-contracts | |
| if: always() | |
| run: | | |
| make docker-compose-down |