@@ -92,24 +92,55 @@ jobs:
9292
9393
9494 test :
95+ needs : [validate-environment, set-versions, print-env]
9596 runs-on : ubuntu-latest
96- needs : print-env
97+
98+ env :
99+ COMPASS_API_KEY : ${{ secrets.COMPASS_API_KEY }}
100+ PRIVATE_KEY : ${{ secrets.PRIVATE_KEY }}
101+ ARBITRUM_RPC_URL : http://localhost:8547
102+ SERVER_URL : http://localhost:80
103+ NPM_PACKAGE_VERSION : ${{ needs.set-versions.outputs.npm_package_version }}
104+ UV_PACKAGE_VERSION : ${{ needs.set-versions.outputs.uv_package_version }}
105+
97106 steps :
98- - uses : actions/checkout@v4
99- - name : Setup Python
100- uses : actions/setup-python@v4
101- with :
102- python-version : ' 3.11'
107+ - name : Checkout repository
108+ uses : actions/checkout@v3
109+
103110 - name : Install uv
104- run : pip install uv
111+ run : curl -LsSf https://astral.sh/uv/install.sh | sh
112+
113+ - name : Start up full local API and anvil
114+ uses : ./.github/actions/local_anvil_and_api
115+ id : local_anvil_and_api
116+ with :
117+ ethereum_rpc_url : ${{ secrets.ETHEREUM_MAINNET_RPC_URL }}
118+ arbitrum_rpc_url : ${{ secrets.ARBITRUM_MAINNET_RPC_URL }}
119+ base_rpc_url : ${{ secrets.BASE_MAINNET_RPC_URL }}
120+ private_key : ${{ secrets.PRIVATE_KEY }}
121+ mono_app_id : ${{ secrets.MONOREPOAPP_ID }}
122+ mono_app_private_key : ${{ secrets.MONOREPOAPP_PRIVATE_KEY }}
123+ fund_amount_eth : " 10"
124+ environment : ${{ needs.validate-environment.outputs.environment }}
125+ aws_ecr_sts_role : ${{ env.AWS_ECR_STS_ROLE }}
126+ ecr_image_uri : 688567264391.dkr.ecr.eu-west-2.amazonaws.com/dojo_api
127+
105128 - name : Install dependencies
129+ working-directory : v1/pendle/python
106130 run : |
107- cd test
131+ if [[ "$UV_PACKAGE_VERSION" != "latest" ]]; then
132+ echo "Installing compass-api-sdk==$UV_PACKAGE_VERSION"
133+ uv add compass-api-sdk==$UV_PACKAGE_VERSION
134+ fi
108135 uv sync
109- - name : Run test
110- env :
111- COMPASS_API_KEY : ${{ secrets.COMPASS_API_KEY }}
112- run : |
113- cd test
114- uv run python main.py
136+ uv pip freeze
137+
138+ - name : Run example
139+ working-directory : v1/pendle/python
140+ run : ./.venv/bin/python src/main.py
141+
142+
143+ # run: |
144+ # cd test
145+ # uv run python main.py
115146
0 commit comments