From 26929e07cb4178c217c415ac1248154fe1addffa Mon Sep 17 00:00:00 2001 From: Andrei Zhidelev <169074588+andrei-neon@users.noreply.github.com> Date: Wed, 21 Aug 2024 11:53:26 +0200 Subject: [PATCH] Add tests for Uniswap-V4 --- .github/workflows/dapps.yml | 2 +- .github/workflows/dapps_reusable.yml | 41 +++++++++++++++++++++++++++- docs/dapps.md | 15 +++++----- 3 files changed, 49 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dapps.yml b/.github/workflows/dapps.yml index 9bdf85fa34..9bc1c58e9f 100644 --- a/.github/workflows/dapps.yml +++ b/.github/workflows/dapps.yml @@ -45,7 +45,7 @@ env: NETWORK: ${{ inputs.network || 'terraform' }} BUILD_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" DUMP_ENVS: True - ALL_DAPPS: "aave-v2,aave-v3,curve,uniswap-v2,uniswap-v3,saddle,yearn,robonomics,compound,curve-factory,pancake" + ALL_DAPPS: "aave-v2,aave-v3,curve,uniswap-v2,uniswap-v3,uniswap-v4,saddle,yearn,robonomics,compound,curve-factory,pancake" jobs: prepare: diff --git a/.github/workflows/dapps_reusable.yml b/.github/workflows/dapps_reusable.yml index 5dd8239df5..5a31198f66 100644 --- a/.github/workflows/dapps_reusable.yml +++ b/.github/workflows/dapps_reusable.yml @@ -188,6 +188,45 @@ jobs: with: name: uniswap-v3-report path: uniswap-v3-report.json + + uniswap-v4: + runs-on: ubuntu-20.04 + if: contains( inputs.dapps, 'uniswap-v4') + env: + PROXY_URL: ${{ inputs.proxy_url }} + NETWORK: ${{ inputs.network }} + SOLANA_URL: ${{ inputs.solana_url }} + FAUCET_URL: ${{ inputs.faucet_url }} + SOLANA_IP: ${{ inputs.solana_ip }} + PROXY_IP: ${{ inputs.proxy_ip }} + steps: + - name: Launch uniswap v4 tests + id: uniswap-v4 + timeout-minutes: 5 + env: + IMAGE: neonlabsorg/uniswap-v4:add-to-ci + run: | + docker pull ${{ env.IMAGE }} + docker run --name=uniswap-v4-${{ github.run_number }} \ + -e NETWORK=${{ env.NETWORK }} \ + -e SOLANA_IP=${{ env.SOLANA_IP }} \ + -e PROXY_IP=${{ env.PROXY_IP }} \ + ${{ env.IMAGE }} + docker wait uniswap-v4-${{ github.run_number }} + echo "exit_code=$?" >> $GITHUB_ENV + - name: Delete the uniswap-v4 container + if: always() && steps.uniswap-v4.result != 'skipped' + run: docker rm -f uniswap-v4-${{ github.run_number }} + - name: Save report + uses: actions/upload-artifact@v4 + with: + name: uniswap-v4-report + path: uniswap-v4-report.json + - name: Check exit code + if: always() && env.exit_code != 0 + run: | + echo "Uniswap v4 tests failed" + exit 1 saddle: runs-on: ubuntu-22.04 @@ -622,7 +661,7 @@ jobs: swap-report: runs-on: ubuntu-20.04 - needs: [uniswap-v2, uniswap-v3, saddle, aave-v2, aave-v3, curve, robonomics, yearn, compound, curve-factory, pancake] + needs: [uniswap-v2, uniswap-v3, uniswap-v4, saddle, aave-v2, aave-v3, curve, robonomics, yearn, compound, curve-factory, pancake] if: always() env: SOLANA_URL: ${{ inputs.solana_url }} diff --git a/docs/dapps.md b/docs/dapps.md index 685bb898fd..3b55a67892 100644 --- a/docs/dapps.md +++ b/docs/dapps.md @@ -4,13 +4,14 @@ This project includes GHA Workflow for regular testing DApps like Uniswap V2, AA This workflow is triggered by cron every Sunday at 01:00 UTC and runs DApp tests, gets a cost report from these tests, and shows this report. 1. Uniswap V2 -2. Uniswap 3 -3. Saddle finance -4. AAVE -5. Curve and Curve-factory -6. Yearn finance -7. Compound -8. Robonomics +2. Uniswap V3 +3. Uniswap V4 +4. Saddle finance +5. AAVE +6. Curve and Curve-factory +7. Yearn finance +8. Compound +9. Robonomics ## dApp report