Skip to content

Commit

Permalink
Add tests for Uniswap-V4
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-neon committed Oct 11, 2024
1 parent 22c582c commit 26929e0
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dapps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
41 changes: 40 additions & 1 deletion .github/workflows/dapps_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down
15 changes: 8 additions & 7 deletions docs/dapps.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 26929e0

Please sign in to comment.