CI / build(deps): bump psycopg[binary,pool] from 3.2.13 to 3.3.3 / pull_request #4949
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: Build proxy docker image | |
| run-name: "CI / ${{ github.event_name == 'workflow_dispatch' && inputs.evm_tag || github.event_name == 'pull_request' && github.event.pull_request.title || 'unknown' }} / ${{ github.event_name }}" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| full_test_suite: | |
| default: "false" | |
| required: true | |
| description: "Run full test suite" | |
| evm_sha_tag: | |
| required: false | |
| description: "Neon EVM commit" | |
| evm_tag: | |
| required: false | |
| description: "Neon EVM branch image tag" | |
| evm_pr_version_branch: | |
| required: false | |
| description: "Neon EVM base branch for PR to version branch" | |
| initial_pr: | |
| required: false | |
| description: "Initial PR" | |
| pull_request: | |
| types: [opened, reopened, synchronize, labeled, unlabeled, ready_for_review] | |
| push: | |
| branches: | |
| - master | |
| - develop | |
| - '[vt][0-9].[0-9]+.[0-9x]+*' | |
| tags: | |
| - "*" | |
| env: | |
| DEFAULT_NEON_EVM_TAG: "latest" | |
| DEFAULT_FAUCET_TAG: "latest" | |
| AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} | |
| AWS_DEFAULT_REGION: "eu-central-1" | |
| AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} | |
| DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | |
| DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
| BUILD_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| NEON_TEST_IMAGE: ${{vars.DOCKERHUB_ORG_NAME}}/neon_tests | |
| TF_VAR_run_number: ${{ github.run_number }} | |
| TF_VAR_ci_pp_solana_url: ${{secrets.DEVNET_INTERNAL_RPC}} | |
| TF_VAR_neon_evm_commit: "latest" | |
| TF_VAR_faucet_model_commit: ${{vars.FAUCET_COMMIT}} | |
| HCLOUD_TOKEN: ${{secrets.HCLOUD_TOKEN}} | |
| DOCKERHUB_ORG_NAME: ${{vars.DOCKERHUB_ORG_NAME}} | |
| DEVNET_SOLANA_URL: ${{secrets.DEVNET_SOLANA_URL}} | |
| NEON_TESTS_IMAGE: "neon_tests" | |
| FAUCET_COMMIT: ${{vars.FAUCET_COMMIT}} | |
| GH_ORG_NAME: ${{vars.GH_ORG_NAME}} | |
| IMAGE_NAME: ${{vars.IMAGE_NAME}} | |
| NEON_TEST_INVOKE_PROGRAM_IMAGE: ${{vars.NEON_TEST_INVOKE_PROGRAM_IMAGE}} | |
| NEON_TEST_RUN_LINK: ${{vars.NEON_TEST_RUN_LINK}} | |
| NEON_TESTS_ENDPOINT: ${{vars.NEON_TESTS_ENDPOINT}} | |
| TFSTATE_BUCKET: ${{vars.TFSTATE_BUCKET}} | |
| TFSTATE_KEY_PREFIX: ${{vars.TFSTATE_KEY_PREFIX}} | |
| TFSTATE_REGION: ${{vars.TFSTATE_REGION}} | |
| GITHUB_RUN_NUMBER: ${{ github.run_number }} | |
| TEST_RESULTS_DB_HOST: ${{ secrets.TEST_RESULTS_DB_HOST }} | |
| TEST_RESULTS_DB_PORT: ${{ secrets.TEST_RESULTS_DB_PORT }} | |
| TEST_RESULTS_DB_NAME: ${{ secrets.TEST_RESULTS_DB_NAME }} | |
| TEST_RESULTS_DB_USER: ${{ secrets.TEST_RESULTS_DB_USER }} | |
| TEST_RESULTS_DB_PASSWORD: ${{ secrets.TEST_RESULTS_DB_PASSWORD }} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}${{ github.event.inputs.evm_sha_tag }} | |
| cancel-in-progress: true | |
| jobs: | |
| set-variables: | |
| outputs: | |
| pull_request: ${{ steps.set-vars.outputs.pull_request }} | |
| runs-on: ["gha-runner-scale-set"] | |
| steps: | |
| - name: Set variables | |
| id: set-vars | |
| run: | | |
| if [[ "${{ github.event.inputs.initial_pr }}" != "" ]]; then | |
| echo "pull_request=${{ github.event.inputs.initial_pr }}" | tee -a $GITHUB_OUTPUT | |
| else | |
| echo "pull_request=${{ github.event.pull_request.issue_url }}/comments" | tee -a $GITHUB_OUTPUT | |
| fi; | |
| build-image: | |
| runs-on: ["gha-runner-scale-set-large"] | |
| outputs: | |
| proxy_tag: ${{ steps.tags.outputs.proxy_tag }} | |
| proxy_sha_tag: ${{ steps.tags.outputs.proxy_sha_tag }} | |
| proxy_pr_version_branch: ${{ steps.tags.outputs.proxy_pr_version_branch }} | |
| is_proxy_release: ${{ steps.tags.outputs.is_proxy_release }} | |
| evm_tag: ${{ steps.tags.outputs.evm_tag }} | |
| evm_sha_tag: ${{ steps.tags.outputs.evm_sha_tag }} | |
| evm_pr_version_branch: ${{ steps.tags.outputs.evm_pr_version_branch }} | |
| faucet_tag: ${{ steps.tags.outputs.faucet_tag }} | |
| neon_test_tag: ${{ steps.tags.outputs.neon_test_tag }} | |
| full_test_suite: ${{ steps.full_test_suite.outputs.value }} | |
| dapps_list: ${{ steps.dapps_list.outputs.dapps_list }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 🔎 Check IP | |
| run: curl https://api.ipify.org | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10.12' | |
| - run: pip install -r ./.github/workflows/requirements.txt | |
| - name: output branches name | |
| run: | | |
| echo "neon_evm_tag/branch = ${{ github.event.inputs.evm_tag }}" | |
| echo "proxy_branch = ${{ github.ref }}" | |
| - name: Specify image tags | |
| run: | | |
| python3 ./.github/workflows/deploy.py specify_image_tags \ | |
| --git_sha=${{ github.sha }} \ | |
| --git_ref=${{ github.ref }} \ | |
| --git_head_ref=${{ github.head_ref }} \ | |
| --git_base_ref=${{ github.base_ref }} \ | |
| --evm_sha_tag=${{ github.event.inputs.evm_sha_tag }} \ | |
| --evm_tag=${{ github.event.inputs.evm_tag }} \ | |
| --default_evm_tag=${DEFAULT_NEON_EVM_TAG} \ | |
| --default_faucet_tag=${DEFAULT_FAUCET_TAG} | |
| - name: Set outputs | |
| id: tags | |
| run: | | |
| echo "proxy_tag=${{ env.PROXY_TAG }}" >> "$GITHUB_OUTPUT" | |
| echo "proxy_sha_tag=${{ env.PROXY_SHA_TAG }}" >> "$GITHUB_OUTPUT" | |
| echo "proxy_pr_version_branch=${{ env.PROXY_PR_VERSION_BRANCH }}" >> "$GITHUB_OUTPUT" | |
| echo "is_proxy_release=${{ env.IS_PROXY_RELEASE }}" >> "$GITHUB_OUTPUT" | |
| echo "evm_tag=${{ env.EVM_TAG }}" >> "$GITHUB_OUTPUT" | |
| echo "evm_sha_tag=${{ env.EVM_SHA_TAG }}" >> "$GITHUB_OUTPUT" | |
| echo "evm_pr_version_branch=${{ github.event.inputs.evm_pr_version_branch }}" >> "$GITHUB_OUTPUT" | |
| echo "faucet_tag=${{ env.FAUCET_TAG }}" >> "$GITHUB_OUTPUT" | |
| echo "neon_test_tag=${{ env.NEON_TEST_TAG }}" >> "$GITHUB_OUTPUT" | |
| - name: Define test set | |
| id: full_test_suite | |
| run: | | |
| if [[ "${{ contains(github.event.pull_request.labels.*.name, 'fullTestSuite') }}" == "true" || "${{ github.event.inputs.full_test_suite }}" == "true" || | |
| ("${{ github.ref_name }}" == 'develop' && "${{github.event.inputs.evm_sha_tag }}" == "") || | |
| "${{ steps.tags.outputs.is_proxy_release }}" == "True" || "${{ steps.tags.outputs.proxy_pr_version_branch }}" != "" ]]; then | |
| value=true | |
| else | |
| value=false | |
| fi; | |
| echo "value=${value}" | |
| echo "value=${value}" >> $GITHUB_OUTPUT | |
| - name: Define dapps tests list | |
| id: dapps_list | |
| run: | | |
| default="aave-v2,saddle,uniswap-v3" | |
| extended=",uniswap-v2,yearn,compound,robonomics,curve,saddle,pancake" | |
| result=$( (${{ steps.full_test_suite.outputs.value }} && echo "${default}${extended}") || echo "${default}" ) | |
| echo "dapps_list=$result" >> $GITHUB_OUTPUT | |
| echo "dapps_list=$result" | |
| - name: Build docker image | |
| run: | | |
| python3 ./.github/workflows/deploy.py build_docker_image \ | |
| --evm_tag=${{ steps.tags.outputs.evm_sha_tag || steps.tags.outputs.evm_tag }} \ | |
| --proxy_tag=${{ steps.tags.outputs.proxy_sha_tag }} | |
| - name: Publish image | |
| run: | | |
| python3 ./.github/workflows/deploy.py publish_image \ | |
| --proxy_sha_tag=${{ steps.tags.outputs.proxy_sha_tag }} \ | |
| --proxy_tag=${{ steps.tags.outputs.proxy_tag }} | |
| deploy-check: | |
| needs: | |
| - build-image | |
| runs-on: ["gha-runner-scale-set"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10.12' | |
| - run: pip install -r ./.github/workflows/requirements.txt | |
| - name: deploy_check | |
| timeout-minutes: 60 | |
| run: | | |
| python3 ./.github/workflows/deploy.py deploy_check \ | |
| --proxy_tag=${{ needs.build-image.outputs.proxy_sha_tag }} | |
| - name: canceling the build if job failed | |
| if: "failure()" | |
| uses: "andymckay/cancel-action@0.4" | |
| prepare-infrastructure: | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{secrets.CI_AWS_ACCESS_KEY_ID}} | |
| AWS_DEFAULT_REGION: "eu-central-1" | |
| AWS_SECRET_ACCESS_KEY: ${{secrets.CI_AWS_SECRET_ACCESS_KEY}} | |
| needs: | |
| - build-image | |
| timeout-minutes: 25 | |
| runs-on: ["gha-runner-scale-set"] | |
| if: always() | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'neonlabsorg/dynamic-ci-cd' | |
| ref: 'main' | |
| token: ${{ secrets.GHTOKEN }} | |
| path: ./dynamic-ci-cd/.github/workflows | |
| - name: Create instance | |
| uses: ./dynamic-ci-cd/.github/workflows/actions/create-instance | |
| id: create-instance | |
| with: | |
| project-repository: ${{ github.event.repository.name }} | |
| run-id: ${{github.run_id}} | |
| cpu: 16 | |
| memory: 32 | |
| hcloud-token: ${{ secrets.HCLOUD_TOKEN }} | |
| - name: Install docker | |
| uses: ./dynamic-ci-cd/.github/workflows/actions/prepare-docker-instance | |
| id: prepare-docker-instance | |
| with: | |
| host: ${{ steps.create-instance.outputs.public-ip-v4 }} | |
| ssh-user: ${{ steps.create-instance.outputs.ssh-user }} | |
| ssh-key: ${{ steps.create-instance.outputs.ssh-key }} | |
| - name: Install envsubst | |
| shell: bash | |
| run: sudo apt-get update && sudo apt-get install -y gettext | |
| - name: Read docker-compose.yaml file content into variable | |
| id: read_compose_file | |
| shell: bash | |
| run: | | |
| rendered=$(envsubst < ./docker-compose/docker-compose-ci.yml) | |
| echo "value<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$rendered" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| env: | |
| REVISION: ${{ needs.build-image.outputs.proxy_sha_tag }} | |
| NEON_EVM_COMMIT: ${{ needs.build-image.outputs.evm_sha_tag || needs.build-image.outputs.evm_tag }} | |
| FAUCET_COMMIT: ${{ needs.build-image.outputs.faucet_tag }} | |
| CI_PP_SOLANA_URL: ${{secrets.DEVNET_INTERNAL_RPC}} | |
| DOCKERHUB_ORG_NAME: ${{vars.DOCKERHUB_ORG_NAME}} | |
| DEVNET_SOLANA_URL: ${{secrets.DEVNET_SOLANA_URL}} | |
| - name: Debug | |
| shell: bash | |
| run: echo "${{ steps.read_compose_file.outputs.value }}" | |
| - name: Run docker containers | |
| uses: ./dynamic-ci-cd/.github/workflows/actions/run-docker-containers | |
| id: run-docker-containerss | |
| with: | |
| docker_host: ${{ steps.create-instance.outputs.public-ip-v4 }} | |
| docker_ca_cert: ${{ steps.prepare-docker-instance.outputs.docker_ca_cert }} | |
| docker_cert: ${{ steps.prepare-docker-instance.outputs.docker_cert }} | |
| docker_key: ${{ steps.prepare-docker-instance.outputs.docker_key }} | |
| docker_containers_wait_for_ready_seconds: 30 | |
| docker_compose: ${{ steps.read_compose_file.outputs.value }} | |
| outputs: | |
| ssh_user: ${{ steps.create-instance.outputs.ssh-user }} | |
| ssh_key: ${{ steps.create-instance.outputs.ssh-key }} | |
| solana_ip: ${{ steps.create-instance.outputs.public-ip-v4 }} | |
| proxy_ip: ${{ steps.create-instance.outputs.public-ip-v4 }} | |
| docker_ca_cert: ${{ steps.prepare-docker-instance.outputs.docker_ca_cert }} | |
| docker_cert: ${{ steps.prepare-docker-instance.outputs.docker_cert }} | |
| docker_key: ${{ steps.prepare-docker-instance.outputs.docker_key }} | |
| openzeppelin-tests: | |
| if: needs.build-image.outputs.full_test_suite=='true' | |
| needs: | |
| - prepare-infrastructure | |
| - build-image | |
| runs-on: ["gha-runner-scale-set-large"] | |
| env: | |
| SOLANA_IP: ${{ needs.prepare-infrastructure.outputs.solana_ip }} | |
| PROXY_IP: ${{ needs.prepare-infrastructure.outputs.proxy_ip }} | |
| CONTAINER: oz-${{ github.run_id }} | |
| NETWORK: terraform | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Pull docker image | |
| run: docker pull ${{ env.NEON_TEST_IMAGE }}:${{ needs.build-image.outputs.neon_test_tag }} | |
| - name: Run docker container | |
| run: | | |
| docker run -i -e PROXY_IP=${{env.PROXY_IP}} \ | |
| -e SOLANA_IP=${{env.SOLANA_IP}} \ | |
| -e NETWORK=${{env.NETWORK}} \ | |
| -d --name=${{ env.CONTAINER }} ${{ env.NEON_TEST_IMAGE }}:${{ needs.build-image.outputs.neon_test_tag }} /bin/bash | |
| - name: Run OpenZeppelin tests | |
| run: | | |
| docker exec -i -e PROXY_IP=${{env.PROXY_IP}} \ | |
| -e SOLANA_IP=${{env.SOLANA_IP}} \ | |
| -e NETWORK=${{env.NETWORK}} \ | |
| ${{ env.CONTAINER }} python3 ./clickfile.py run oz \ | |
| --network ${{ env.NETWORK }} \ | |
| --jobs 8 \ | |
| --users 10 | |
| - name: Print OpenZeppelin report | |
| run: | | |
| docker exec -i ${{ env.CONTAINER }} python3 ./clickfile.py oz report | |
| - name: Analyze tests results | |
| run: | | |
| docker exec -i ${{ env.CONTAINER }} python3 ./clickfile.py oz analyze | |
| - name: "Archive report" | |
| if: always() | |
| run: | | |
| docker exec -i ${{ env.CONTAINER }} tar -czvf ./allure-results.tar.gz /opt/neon-tests/allure-results | |
| docker cp ${{ env.CONTAINER }}:/opt/neon-tests/allure-results.tar.gz ./ | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: FTS allure report | |
| path: allure-results.tar.gz | |
| - name: Remove docker container | |
| if: always() | |
| run: docker rm -f ${{ env.CONTAINER }} | |
| - name: canceling the build if job failed | |
| if: "failure()" | |
| uses: "andymckay/cancel-action@0.4" | |
| basic-tests: | |
| needs: | |
| - prepare-infrastructure | |
| - build-image | |
| runs-on: ["gha-runner-scale-set-large"] | |
| env: | |
| SOLANA_IP: ${{ needs.prepare-infrastructure.outputs.solana_ip }} | |
| PROXY_IP: ${{ needs.prepare-infrastructure.outputs.proxy_ip }} | |
| NUMPROCESSES: 12 | |
| CONTAINER: basic-${{ github.run_id }} | |
| NETWORK: terraform | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Determine Cost Report Generation | |
| run: | | |
| echo "GENERATE_COST_REPORT=true" >> $GITHUB_ENV | |
| - name: Run docker container | |
| run: | | |
| image="${{ env.NEON_TEST_IMAGE }}:${{ needs.build-image.outputs.neon_test_tag }}" | |
| docker pull $image | |
| docker run -i -d -e PROXY_IP=${{ env.PROXY_IP }} -e SOLANA_IP=${{ env.SOLANA_IP }} \ | |
| --name=${{ env.CONTAINER }} $image /bin/bash | |
| - name: Run basic tests | |
| run: | | |
| CMD="python3 ./clickfile.py run basic --network ${{ env.NETWORK }} --numprocesses ${{ env.NUMPROCESSES }}" | |
| if [[ "${{ env.GENERATE_COST_REPORT }}" == "true" ]]; then | |
| CMD="$CMD --cost_reports_dir reports/cost_reports" | |
| fi | |
| docker exec -i ${{ env.CONTAINER }} $CMD | |
| - name: "Generate allure report" | |
| if: always() | |
| uses: neonlabsorg/neon-tests/.github/actions/generate-allure-report@develop | |
| with: | |
| container: ${{ env.CONTAINER }} | |
| network: ${{ env.NETWORK }} | |
| aws_access_key_id: ${{ env.AWS_ACCESS_KEY_ID }} | |
| aws_secret_access_key: ${{ env.AWS_SECRET_ACCESS_KEY }} | |
| tests_name: basic | |
| - name: Copy cost reports from container | |
| if: ${{ env.GENERATE_COST_REPORT == 'true' }} | |
| run: | | |
| mkdir -p ./reports/cost_reports/ && \ | |
| docker cp ${{ env.CONTAINER }}:/opt/neon-tests/reports/cost_reports/. ./reports/cost_reports/ | |
| - name: Upload cost reports as artifacts | |
| if: ${{ env.GENERATE_COST_REPORT == 'true' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cost-reports | |
| path: reports/cost_reports/**.json | |
| - name: Swap Cost Reports and echo to Summary | |
| if: ${{ env.GENERATE_COST_REPORT == 'true' }} | |
| run: | | |
| docker exec -i -e NETWORK=${{ env.NETWORK }} ${{ env.CONTAINER }} \ | |
| python3 ./clickfile.py dapps save_dapps_cost_report_to_md \ | |
| --directory reports/cost_reports && \ | |
| docker exec -i ${{ env.CONTAINER }} cat cost_reports.md >> $GITHUB_STEP_SUMMARY | |
| - name: "Save Cost Report to DB" | |
| id: save-cost-report-to-db | |
| if: ${{ env.GENERATE_COST_REPORT == 'true' }} | |
| run: | | |
| docker exec -i \ | |
| -e NETWORK=${{ env.NETWORK }} \ | |
| -e TEST_RESULTS_DB_HOST=${{ env.TEST_RESULTS_DB_HOST }} \ | |
| -e TEST_RESULTS_DB_PORT=${{ env.TEST_RESULTS_DB_PORT }} \ | |
| -e TEST_RESULTS_DB_NAME=${{ env.TEST_RESULTS_DB_NAME }} \ | |
| -e TEST_RESULTS_DB_USER=${{ env.TEST_RESULTS_DB_USER }} \ | |
| -e TEST_RESULTS_DB_PASSWORD=${{ env.TEST_RESULTS_DB_PASSWORD }} \ | |
| ${{ env.CONTAINER }} \ | |
| python3 ./clickfile.py dapps save_dapps_cost_report_to_db \ | |
| --directory="reports/cost_reports" \ | |
| --repo="${{ needs.build-image.outputs.evm_sha_tag == '' && 'proxy' || 'evm' }}" \ | |
| --evm_tag="${{ needs.build-image.outputs.evm_tag }}" \ | |
| --proxy_tag="${{ needs.build-image.outputs.proxy_tag }}" \ | |
| --evm_commit_sha="${{ needs.build-image.outputs.evm_sha_tag }}" \ | |
| --proxy_commit_sha="${{ needs.build-image.outputs.proxy_sha_tag }}" | |
| - name: Remove docker container | |
| if: always() | |
| run: docker rm -f ${{ env.CONTAINER }} | |
| - name: canceling the build if job failed | |
| if: "failure()" | |
| uses: "andymckay/cancel-action@0.4" | |
| dapps-tests: | |
| needs: | |
| - set-variables | |
| - prepare-infrastructure | |
| - build-image | |
| uses: neonlabsorg/neon-tests/.github/workflows/dapps_reusable.yml@develop | |
| secrets: inherit | |
| with: | |
| network: custom | |
| dapps: ${{ needs.build-image.outputs.dapps_list }} | |
| proxy_url: "http://${{ needs.prepare-infrastructure.outputs.proxy_ip }}:9090/solana" | |
| solana_url: "http://${{ needs.prepare-infrastructure.outputs.solana_ip }}:8899/" | |
| faucet_url: "http://${{ needs.prepare-infrastructure.outputs.proxy_ip }}:3333/" | |
| network_id: "111" | |
| pr_url_for_report: ${{ needs.set-variables.outputs.pull_request }} | |
| proxy_ip: ${{ needs.prepare-infrastructure.outputs.proxy_ip }} | |
| solana_ip: ${{ needs.prepare-infrastructure.outputs.solana_ip }} | |
| external_call: true | |
| repo: ${{ needs.build-image.outputs.evm_sha_tag == '' && 'proxy' || 'evm' }} | |
| evm_tag: ${{ needs.build-image.outputs.evm_tag }} | |
| evm_sha_tag: ${{ needs.build-image.outputs.evm_sha_tag }} | |
| proxy_tag: ${{ needs.build-image.outputs.proxy_tag }} | |
| proxy_sha_tag: ${{ needs.build-image.outputs.proxy_sha_tag }} | |
| proxy_pr_version_branch: ${{ needs.build-image.outputs.proxy_pr_version_branch }} | |
| evm_pr_version_branch: ${{ needs.build-image.outputs.evm_pr_version_branch }} | |
| requests-report: | |
| needs: | |
| - set-variables | |
| - prepare-infrastructure | |
| - basic-tests | |
| - build-image | |
| - dapps-tests | |
| - openzeppelin-tests | |
| if: | | |
| always() && | |
| contains(fromJSON('["success", "skipped"]'), needs.openzeppelin-tests.result) && | |
| contains(fromJSON('["success", "skipped"]'), needs.dapps-tests.result) | |
| runs-on: ["gha-runner-scale-set"] | |
| env: | |
| SOLANA_IP: ${{ needs.prepare-infrastructure.outputs.solana_ip }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10.12' | |
| - run: pip install -r ./.github/workflows/requirements.txt | |
| - name: Request report | |
| id: request_report | |
| run: | | |
| stats=$(python3 ./.github/workflows/deploy.py parse_logs --solana_ip=${{ env.SOLANA_IP }}) | |
| echo "stats<<EOF" >> $GITHUB_OUTPUT | |
| echo "$stats" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| echo "stats=$stats" | |
| - name: "Post a comment with the report" | |
| run: | | |
| python3 ./.github/workflows/deploy.py post_comment --message="${{ steps.request_report.outputs.stats }}" \ | |
| --pull_request="${{ needs.set-variables.outputs.pull_request }}" \ | |
| --token=${{ secrets.GHTOKEN }} | |
| destroy-terraform: | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{secrets.CI_AWS_ACCESS_KEY_ID}} | |
| AWS_DEFAULT_REGION: "eu-central-1" | |
| AWS_SECRET_ACCESS_KEY: ${{secrets.CI_AWS_SECRET_ACCESS_KEY}} | |
| needs: | |
| - prepare-infrastructure | |
| - openzeppelin-tests | |
| - basic-tests | |
| - requests-report | |
| - dapps-tests | |
| - build-image | |
| runs-on: ["gha-runner-scale-set"] | |
| if: always() | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'neonlabsorg/dynamic-ci-cd' | |
| ref: 'main' | |
| token: ${{ secrets.GHTOKEN }} | |
| path: dynamic-ci-cd | |
| - name: Fetch docker logs | |
| uses: ./dynamic-ci-cd/actions/fetch-docker-container-logs | |
| with: | |
| docker_host: ${{ needs.prepare-infrastructure.outputs.proxy_ip }} | |
| docker_ca_cert: ${{ needs.prepare-infrastructure.outputs.docker_ca_cert }} | |
| docker_cert: ${{ needs.prepare-infrastructure.outputs.docker_cert }} | |
| docker_key: ${{ needs.prepare-infrastructure.outputs.docker_key }} | |
| container_names: "solana,neon-core-api,neon-core-rpc,postgres,dbcreation,proxy,faucet,indexer" | |
| - name: Set output | |
| id: vars | |
| run: echo "bname=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| - name: Delete instance | |
| uses: ./dynamic-ci-cd/actions/delete-instance | |
| id: detele-instance | |
| with: | |
| project-repository: ${{ github.event.repository.name }} | |
| job-id: ${{ github.job }} | |
| run-id: ${{github.run_id}} | |
| hcloud-token: ${{ secrets.HCLOUD_TOKEN }} | |
| finalize-image: | |
| runs-on: ["gha-runner-scale-set"] | |
| needs: | |
| - build-image | |
| - openzeppelin-tests | |
| - basic-tests | |
| - dapps-tests | |
| - deploy-check | |
| if: | | |
| always() && | |
| needs.deploy-check.result == 'success' && | |
| needs.basic-tests.result == 'success' && | |
| needs.dapps-tests.result == 'success' && | |
| contains(fromJSON('["success", "skipped"]'), needs.openzeppelin-tests.result) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10.12' | |
| - run: pip install -r ./.github/workflows/requirements.txt | |
| - name: Tag published image if tag is latest or version | |
| run: | | |
| python3 ./.github/workflows/deploy.py finalize_image \ | |
| --proxy_sha_tag=${{ needs.build-image.outputs.proxy_sha_tag }} \ | |
| --proxy_tag=${{ needs.build-image.outputs.proxy_tag }} | |
| notification: | |
| runs-on: ["gha-runner-scale-set"] | |
| needs: | |
| - finalize-image | |
| - openzeppelin-tests | |
| - basic-tests | |
| - dapps-tests | |
| - deploy-check | |
| - build-image | |
| if: | | |
| failure() && needs.build-image.outputs.full_test_suite == 'true' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10.12' | |
| - run: pip install -r ./.github/workflows/requirements.txt | |
| - name: Send notification to slack | |
| run: | | |
| python3 ./.github/workflows/deploy.py send_notification \ | |
| --url=${{secrets.SLACK_PROXY_CHANNEL_URL}} \ | |
| --build_url=${BUILD_URL} |