diff --git a/.github/workflows/ci_consumption_workflow.yml b/.github/workflows/ci_consumption_workflow.yml index 907e3de4c..6ff1849e7 100644 --- a/.github/workflows/ci_consumption_workflow.yml +++ b/.github/workflows/ci_consumption_workflow.yml @@ -30,10 +30,23 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Get Date + id: get-date + run: | + echo "todayDate=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_ENV + shell: bash + - uses: actions/cache@v4 + id: cache-pip + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ env.todayDate }}-${{ matrix.python-version }} - name: Install dependencies + if: steps.cache-pip.outputs.cache-hit != 'true' run: | python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U azure-functions --pre python -m pip install -U -e .[dev] + - name: Install worker + run: | python setup.py build - name: Running 3.7 Tests if: matrix.python-version == 3.7 diff --git a/.github/workflows/ci_e2e_workflow.yml b/.github/workflows/ci_e2e_workflow.yml index 11dc7a4d9..b0cc67453 100644 --- a/.github/workflows/ci_e2e_workflow.yml +++ b/.github/workflows/ci_e2e_workflow.yml @@ -39,7 +39,23 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: "8.0.x" - - name: Install dependencies and the worker + - name: Get Date + id: get-date + run: | + echo "todayDate=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_ENV + shell: bash + - uses: actions/cache@v4 + id: cache-pip + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ env.todayDate }}-${{ matrix.python-version }} + - name: Install dependencies + if: steps.cache-pip.outputs.cache-hit != 'true' + run: | + python -m pip install --upgrade pip + python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U azure-functions --pre + python -m pip install -U -e .[dev] + - name: Install worker run: | retry() { local -r -i max_attempts="$1"; shift @@ -58,10 +74,6 @@ jobs: done } - python -m pip install --upgrade pip - python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U azure-functions --pre - python -m pip install -U -e .[dev] - # Retry a couple times to avoid certificate issue retry 5 python setup.py build retry 5 python setup.py webhost --branch-name=dev diff --git a/.github/workflows/ci_ut_workflow.yml b/.github/workflows/ci_ut_workflow.yml index 002cac245..80a252ddd 100644 --- a/.github/workflows/ci_ut_workflow.yml +++ b/.github/workflows/ci_ut_workflow.yml @@ -37,7 +37,23 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: "8.0.x" - - name: Install dependencies and the worker + - name: Get Date + id: get-date + run: | + echo "todayDate=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_ENV + shell: bash + - uses: actions/cache@v4 + id: cache-pip + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ env.todayDate }}-${{ matrix.python-version }} + - name: Install dependencies + if: steps.cache-pip.outputs.cache-hit != 'true' + run: | + python -m pip install --upgrade pip + python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U azure-functions --pre + python -m pip install -U -e .[dev] + - name: Install the worker run: | retry() { local -r -i max_attempts="$1"; shift @@ -56,10 +72,6 @@ jobs: done } - python -m pip install --upgrade pip - python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U azure-functions --pre - python -m pip install -U -e .[dev] - # Retry a couple times to avoid certificate issue retry 5 python setup.py build retry 5 python setup.py webhost --branch-name=dev