[PortalDB][Attempt 2] POC PostgREST implementation with API Autogen #1428
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: PATH E2E Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| # --------------------------------------------- # | |
| # Phase 1. Build Docker Image | |
| # --------------------------------------------- # | |
| build-and-test-docker-image: | |
| name: Build & test Docker image | |
| runs-on: "ubuntu-22.04" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and export Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| build-args: | | |
| IMAGE_TAG=path-image | |
| GITHUB_TOKEN=${{ github.token }} | |
| push: false | |
| load: true | |
| tags: path-image | |
| - name: Test the image works | |
| run: | | |
| docker image ls -a | |
| docker inspect path-image || exit 1 | |
| - name: Export image to TAR file | |
| run: | | |
| docker save path-image -o ${{ runner.temp }}/path-image.tar | |
| - name: Upload artifact for use by E2E tests | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: path-image | |
| path: ${{ runner.temp }}/path-image.tar | |
| retention-days: 1 | |
| # ------------------------------------ # | |
| # Phase 2. E2E Tests | |
| # ------------------------------------ # | |
| run-e2e-tests-shannon: | |
| name: Run E2E tests - HTTP Requests | |
| runs-on: "ubuntu-22.04" | |
| needs: | |
| - build-and-test-docker-image | |
| strategy: | |
| matrix: | |
| # DEV_NOTE: Add new services here if they should be tested as part of the Shannon E2E CI suite | |
| service_id: [eth, pocket, xrplevm, giwa-sepolia-testnet] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24" | |
| - name: Download Docker image artifact from previous job | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: path-image | |
| path: ${{ runner.temp }} | |
| - name: Load Docker image | |
| run: | | |
| docker load --input ${{ runner.temp }}/path-image.tar | |
| docker image ls -a | |
| - name: copy Shannon E2E config | |
| run: make config_prepare_shannon_e2e | |
| - name: update Shannon E2E config from secrets | |
| env: | |
| SHANNON_GATEWAY_ADDRESS: ${{ secrets.SHANNON_GATEWAY_ADDRESS }} | |
| SHANNON_GATEWAY_PRIVATE_KEY: ${{ secrets.SHANNON_GATEWAY_PRIVATE_KEY }} | |
| SHANNON_OWNED_APPS_PRIVATE_KEYS: ${{ secrets.SHANNON_OWNED_APPS_PRIVATE_KEYS}} | |
| run: ./e2e/scripts/ci/update_shannon_config_from_secrets.sh | |
| - name: Set Docker container to log to stdout in CI environment | |
| run: ./e2e/scripts/ci/set_docker_log.sh | |
| - name: Run E2E test - Service ID ${{ matrix.service_id }} | |
| # eg. make test_e2e_evm_shannon eth | |
| run: make e2e_test ${{ matrix.service_id }} | |
| run-e2e-tests-eth-fallback: | |
| name: Run E2E test - ETH Fallback | |
| runs-on: "ubuntu-22.04" | |
| needs: | |
| - build-and-test-docker-image | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24" | |
| - name: Download Docker image artifact from previous job | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: path-image | |
| path: ${{ runner.temp }} | |
| - name: Load Docker image | |
| run: | | |
| docker load --input ${{ runner.temp }}/path-image.tar | |
| docker image ls -a | |
| - name: copy Shannon E2E config | |
| run: make config_prepare_shannon_e2e | |
| - name: update Shannon E2E config from secrets | |
| env: | |
| SHANNON_GATEWAY_ADDRESS: ${{ secrets.SHANNON_GATEWAY_ADDRESS }} | |
| SHANNON_GATEWAY_PRIVATE_KEY: ${{ secrets.SHANNON_GATEWAY_PRIVATE_KEY }} | |
| SHANNON_OWNED_APPS_PRIVATE_KEYS: ${{ secrets.SHANNON_OWNED_APPS_PRIVATE_KEYS}} | |
| SHANNON_ETH_FALLBACK_URL: ${{ secrets.SHANNON_ETH_FALLBACK_URL }} | |
| run: ./e2e/scripts/ci/update_shannon_config_from_secrets.sh | |
| - name: Set Docker container to log to stdout in CI environment | |
| run: ./e2e/scripts/ci/set_docker_log.sh | |
| - name: Run E2E test - ETH Fallback | |
| run: make e2e_test_eth_fallback ${{ secrets.SHANNON_ETH_FALLBACK_URL }} | |
| run-e2e-tests-websockets: | |
| name: Run E2E tests - WebSockets | |
| runs-on: "ubuntu-22.04" | |
| needs: | |
| - build-and-test-docker-image | |
| strategy: | |
| matrix: | |
| # DEV_NOTE: Add new services here if they should be tested as part of the Shannon E2E CI suite | |
| service_id: [xrplevm, eth] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24" | |
| - name: Download Docker image artifact from previous job | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: path-image | |
| path: ${{ runner.temp }} | |
| - name: Load Docker image | |
| run: | | |
| docker load --input ${{ runner.temp }}/path-image.tar | |
| docker image ls -a | |
| - name: copy Shannon E2E config | |
| run: make config_prepare_shannon_e2e | |
| - name: update Shannon E2E config from secrets | |
| env: | |
| SHANNON_GATEWAY_ADDRESS: ${{ secrets.SHANNON_GATEWAY_ADDRESS }} | |
| SHANNON_GATEWAY_PRIVATE_KEY: ${{ secrets.SHANNON_GATEWAY_PRIVATE_KEY }} | |
| SHANNON_OWNED_APPS_PRIVATE_KEYS: ${{ secrets.SHANNON_OWNED_APPS_PRIVATE_KEYS}} | |
| run: ./e2e/scripts/ci/update_shannon_config_from_secrets.sh | |
| - name: Set Docker container to log to stdout in CI environment | |
| run: ./e2e/scripts/ci/set_docker_log.sh | |
| - name: Run Websocket E2E test - Service ID ${{ matrix.service_id }} | |
| run: make e2e_test_websocket ${{ matrix.service_id }} |