test(bug): txtar to reproduce the VM hanging during Render (#1736) #1
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: Staging | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| pull_request: | |
| paths: | |
| - "misc/loop/**" | |
| - ".github/workflows/staging.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build-staging: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Docker metadata portalloopd | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/${{ github.repository }}/portalloopd | |
| tags: | | |
| type=raw,value=latest | |
| type=semver,pattern=v{{version}} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| target: portalloopd | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| push: ${{ github.event_name != 'pull_request' }} | |
| test-staging-running-in-compose: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: "Checkout" | |
| uses: actions/checkout@v4 | |
| - name: "Setup The staging docker compose" | |
| # Pull the current Docker image of Gnoland to allow the loop application | |
| # finding already the image in the local registry when booting. | |
| run: | | |
| docker pull ghcr.io/gnolang/gno/gnoland:master | |
| cd misc/loop | |
| echo "Making docker compose happy" | |
| touch .env | |
| make docker.ci | |
| - name: "Test1 - Staging start gnoland" | |
| run: | | |
| while | |
| block_height=$(curl -s localhost:26657/status | jq -r '.result.sync_info.latest_block_height') | |
| echo "Current block height: $block_height" | |
| [[ "$block_height" -lt 2 ]] | |
| do | |
| sleep 1 | |
| done | |
| curl -s localhost:26657/status | jq | |
| - name: "Build new gnolang/gno image" | |
| run: | | |
| docker build -t ghcr.io/gnolang/gno/gnoland:master -f Dockerfile --target gnoland . | |
| - name: "Wait for new docker image" | |
| run: | | |
| ip_addr=$(cat misc/loop/traefik/gno.yml | grep -o "http://.*:26657") | |
| while | |
| new_ip_addr=$(cat misc/loop/traefik/gno.yml | grep -o "http://.*:26657") | |
| echo "${ip_addr} -> ${new_ip_addr}" | |
| [[ "${ip_addr}" == ${new_ip_addr} ]] | |
| do | |
| sleep 5 | |
| done | |
| - name: "Test2 - Wait staging start new image" | |
| run: | | |
| while | |
| block_height=$(curl -s localhost:26657/status | jq -r '.result.sync_info.latest_block_height') | |
| echo "Current block height: $block_height" | |
| [[ "$block_height" -lt 2 ]] | |
| do | |
| sleep 5 | |
| done | |
| docker ps -a | |
| curl -s localhost:26657/status | jq |