From f6363c0d80cb87847a546c58660acbb400c2c3a9 Mon Sep 17 00:00:00 2001 From: Artem Storozhuk Date: Wed, 13 Dec 2023 16:00:25 +0200 Subject: [PATCH] Exclude 'main' branch from e2e integration testing --- .github/workflows/ci.yml | 40 ----------------------------------- .github/workflows/end2end.yml | 3 ++- 2 files changed, 2 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 132126b..96fff92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,48 +4,8 @@ on: push: pull_request: types: [opened, synchronize, reopened, ready_for_review] - merge_group: - workflow_dispatch: jobs: - integration-tests-e2e: - name: E2E verification - # Run on merge_group and workflow_dispatch only - if: (github.event_name != 'push' && github.event_name != 'pull_request') || github.event.action == 'enqueued' - runs-on: [self-hosted] - env: - ANVIL_PRIVATE_KEY: ${{secrets.ANVIL_PRIVATE_KEY}} - ANVIL_URL: ${{secrets.ANVIL_RPC_URL}} - strategy: - fail-fast: true - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - - name: Deploy main contract - run: | - echo "CONTRACT_ADDRESS=$(forge script script/Deployment.s.sol:NovaVerifierDeployer --fork-url $ANVIL_URL --private-key $ANVIL_PRIVATE_KEY --broadcast --non-interactive | sed -n 's/.*Contract Address: //p' | tail -1)" >> $GITHUB_OUTPUT - id: deployment - - - name: Load proof and public parameters - run: | - python loader.py pp-verifier-key.json pp-compressed-snark.json ${{steps.deployment.outputs.CONTRACT_ADDRESS}} $ANVIL_URL $ANVIL_PRIVATE_KEY - - - name: Check proof verification status - run: | - [[ $(cast call ${{steps.deployment.outputs.CONTRACT_ADDRESS}} "verify(uint32,uint256[],uint256[],bool)(bool)" "3" "[1]" "[0]" "true" --private-key $ANVIL_PRIVATE_KEY --rpc-url $ANVIL_URL) == true ]] && exit 0 || exit 1 - unit-tests: strategy: fail-fast: true diff --git a/.github/workflows/end2end.yml b/.github/workflows/end2end.yml index 790c74d..0d08a18 100644 --- a/.github/workflows/end2end.yml +++ b/.github/workflows/end2end.yml @@ -21,6 +21,7 @@ jobs: && github.event.issue.state == 'open' && contains(github.event.comment.body, '!test') && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') + && github.ref != 'refs/heads/main' steps: - uses: actions/checkout@v4 with: @@ -62,4 +63,4 @@ jobs: body: | End-to-end `!test` action succeeded! :rocket: - https://github.com/lurk-lab/solidity-verifier/actions/runs/${{ github.run_id }} + https://github.com/lurk-lab/solidity-verifier/actions/runs/${{ github.run_id }} \ No newline at end of file