Skip to content

ci: cache dependencies in worker pipelines #1467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/ci_consumption_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/ci_e2e_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/ci_ut_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading