From c2c9e4fd5a8418a250118620413c7e060b49374e Mon Sep 17 00:00:00 2001 From: trizin <25263018+trizin@users.noreply.github.com> Date: Wed, 18 Oct 2023 16:56:45 +0300 Subject: [PATCH] #246 - CI install dependencies first then wait for contract deployment (#247) * Install dependencies before waiting for contract deployment * Define timeout --------- Co-authored-by: Trent McConaghy --- .github/workflows/pytest.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 2efa3150b..3e64677ef 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -15,6 +15,7 @@ env: jobs: test: runs-on: ubuntu-latest + timeout-minutes: 30 steps: - name: Setup repository uses: actions/checkout@v3 @@ -36,14 +37,6 @@ jobs: SUBGRAPH_VERSION: main run: | bash -x start_ocean.sh --no-aquarius --no-elasticsearch --no-provider --no-dashboard --with-thegraph --predictoor > start_ocean.log & - - - name: Wait for contracts deployment - working-directory: ${{ github.workspace }}/barge - run: | - for i in $(seq 1 250); do - sleep 5 - [ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && break - done - name: Install dependencies working-directory: ${{ github.workspace }} @@ -52,6 +45,14 @@ jobs: pip install -r requirements.txt pip install pytest + - name: Wait for contracts deployment + working-directory: ${{ github.workspace }}/barge + run: | + for i in $(seq 1 250); do + sleep 5 + [ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && break + done + - name: Test with pytest id: pytest run: |