chore(test-suite): upgrade relayer and remove inline comments #4605
Workflow file for this run
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: host-contracts-docker-deployment-tests | |
| permissions: {} | |
| on: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| check-changes: | |
| name: host-contracts-docker-deployment-tests/check-changes | |
| permissions: | |
| actions: 'read' # Required to read workflow run information | |
| contents: 'read' # Required to checkout repository code | |
| pull-requests: 'read' # Required to read pull request information | |
| runs-on: ubuntu-latest | |
| outputs: | |
| changes-host-contracts: ${{ steps.filter.outputs.host-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: | | |
| host-contracts: | |
| - .github/workflows/host-contracts-docker-deployment-tests.yml | |
| - host-contracts/** | |
| docker-compose-tests: | |
| needs: check-changes | |
| name: host-contracts-docker-deployment-tests/docker-compose-tests (bpr) | |
| if: ${{ needs.check-changes.outputs.changes-host-contracts == 'true' }} | |
| 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.GHCR_READ_TOKEN }} | |
| - name: Create .env file | |
| working-directory: host-contracts | |
| run: | | |
| cp .env.example .env | |
| - name: Build and start Docker services | |
| working-directory: host-contracts | |
| run: | | |
| docker compose build | |
| docker compose up -d | |
| - name: Check smart contract deployment | |
| working-directory: host-contracts | |
| run: | | |
| # Wait for the deployment container to finish (timeout after reasonable time) | |
| timeout 300s bash -c 'while docker ps --filter "name=fhevm-sc-deploy" --format "{{.Status}}" | grep -q "Up"; do sleep 5; done' | |
| # Save logs to a file for analysis | |
| docker compose logs fhevm-sc-deploy > deployment_logs.txt | |
| # Check if the container exited with success (exit code 0) | |
| EXIT_CODE=$(docker inspect --format='{{.State.ExitCode}}' fhevm-sc-deploy) | |
| # Display logs for debugging | |
| cat deployment_logs.txt | |
| # Check for exit code and expected message in logs | |
| if [ "$EXIT_CODE" -ne 0 ]; then | |
| echo "Deployment failed with exit code $EXIT_CODE" | |
| exit 1 | |
| elif ! grep -q "Contract deployment done!" deployment_logs.txt; then | |
| echo "Deployment did not complete successfully - 'Contract deployment done!' message not found in logs" | |
| exit 1 | |
| else | |
| echo "Deployment completed successfully with expected completion message" | |
| fi | |
| - name: Clean up | |
| working-directory: host-contracts | |
| if: always() | |
| run: | | |
| docker compose down -v --remove-orphans |