Skip to content

Commit

Permalink
make pip upgrade + deps install consistent across actions
Browse files Browse the repository at this point in the history
  • Loading branch information
yashgorana committed Jun 28, 2024
1 parent 39e4cda commit 071e6e6
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 94 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/cd-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install tox
- name: Install pip dependencies
run: |
pip install --upgrade pip==24.1 uv==0.2.17 tox tox-uv==1.9.0
python -m pip install --upgrade pip==24.1
pip install uv==0.2.17 tox tox-uv==1.9.0
uv --version
- name: Build the docs
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/cd-post-release-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

- name: Upgrade pip
run: |
python -m pip install --upgrade --user pip
python -m pip install --upgrade pip==24.1
- name: Get pip cache dir
id: pip-cache
Expand Down Expand Up @@ -116,23 +116,25 @@ jobs:
K3D_VERSION=v5.6.3
wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=$K3D_VERSION bash
- name: Get pip cache dir
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip==24.1
pip install uv==0.2.17 tox tox-uv==1.9.0
uv --version
- name: Get uv cache dir
id: pip-cache
shell: bash
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
echo "dir=$(uv cache dir)" >> $GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-py${{ matrix.python-version }}-
- name: Install tox
run: |
pip install --upgrade pip==24.1 uv==0.2.17 tox tox-uv==1.9.0
${{ runner.os }}-uv-py${{ matrix.python-version }}-
- name: Run K8s tests
env:
Expand Down Expand Up @@ -164,7 +166,7 @@ jobs:

- name: Upgrade pip
run: |
python -m pip install --upgrade --user pip
python -m pip install --upgrade pip==24.1
- name: Get pip cache dir
id: pip-cache
Expand Down Expand Up @@ -193,7 +195,7 @@ jobs:
- name: Install tox and uv
run: |
pip install --upgrade pip==24.1 uv==0.2.17 tox tox-uv==1.9.0 tox-current-env
pip install --upgrade uv==0.2.17 tox tox-uv==1.9.0 tox-current-env
- name: Run unit tests
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/cd-syft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip==24.1 uv==0.2.17 bump2version tox tox-uv==1.9.0
python -m pip install --upgrade pip==24.1
pip install uv==0.2.17 tox tox-uv==1.9.0 bump2version
uv --version
- name: Get Release tag
Expand Down Expand Up @@ -386,7 +387,8 @@ jobs:
python-version: "3.12"
- name: Install dependencies
run: |
pip install --upgrade pip==24.1 uv==0.2.17 tox tox-uv==1.9.0 setuptools wheel twine bump2version PyYAML
python -m pip install --upgrade pip==24.1
pip install uv==0.2.17 tox tox-uv==1.9.0 setuptools wheel twine bump2version PyYAML
uv --version
- name: Bump the Version
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/cd-syftcli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,11 @@ jobs:
with:
python-version: "3.12"

- name: Install build dependencies for syftcli
- name: Install pip dependencies
run: |
pip install --upgrade pip==24.1
- name: Install Tox
run: |
pip install -U tox
python -m pip install --upgrade pip==24.1
pip install --upgrade uv==0.2.17 tox tox-uv==1.9.0
uv --version
- name: Build syftcli
env:
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/e2e-tests-notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
- name: Install pip dependencies
run: |
python -m pip install --upgrade --user pip
- name: Install Deps
run: |
pip install --upgrade pip==24.1 uv==0.2.17 tox tox-uv==1.9.0
python -m pip install --upgrade pip==24.1
pip install uv==0.2.17 tox tox-uv==1.9.0
uv --version
- name: Get pip cache dir
id: pip-cache
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/post-merge-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:

- name: Install pip packages
run: |
python -m pip install --upgrade --user pip tox
python -m pip install --upgrade pip==24.1
pip install uv==0.2.17 tox tox-uv==1.9.0
uv --version
- name: Check and Bump Protocol Version
run: |
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/pr-tests-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
- name: Install pip dependencies
if: steps.changes.outputs.frontend == 'true'
run: |
pip install --upgrade pip==24.1 uv==0.2.17
python -m pip install --upgrade pip==24.1
pip install --upgrade uv==0.2.17 tox tox-uv==1.9.0
uv --version
- name: Get pip cache dir
- name: Get uv cache dir
id: pip-cache
if: steps.changes.outputs.frontend == 'true'
shell: bash
Expand All @@ -69,11 +70,6 @@ jobs:
if: steps.changes.outputs.frontend == 'true' && matrix.os == 'macos-latest'
uses: crazy-max/[email protected]

- name: Install Tox
if: steps.changes.outputs.frontend == 'true'
run: |
pip install --upgrade tox tox-uv==1.9.0
- name: Remove existing containers
if: steps.changes.outputs.frontend == 'true'
continue-on-error: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-tests-helm-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
brew install kube-linter FairwindsOps/tap/polaris
# Install python deps
pip install --upgrade pip==24.1
pip install tox
python -m pip install --upgrade pip==24.1
pip install uv==0.2.17 tox tox-uv==1.9.0
kube-linter version
polaris version
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-tests-helm-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
brew update
# Install python deps
pip install --upgrade pip==24.1
pip install tox
python -m pip install --upgrade pip==24.1
pip install uv==0.2.17 tox tox-uv==1.9.0
# Install kubernetes
brew install helm k3d devspace kubectl
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/pr-tests-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ jobs:

- name: Install pip packages
run: |
pip install --upgrade pip==24.1 uv==0.2.17
python -m pip install --upgrade pip==24.1
pip install --upgrade uv==0.2.17 tox tox-uv==1.9.0
uv --version
- name: Get pip cache dir
- name: Get uv cache dir
id: pip-cache
shell: bash
run: |
Expand All @@ -47,10 +48,6 @@ jobs:
restore-keys: |
${{ runner.os }}-uv-py${{ matrix.python-version }}-
- name: Install Tox
run: |
pip install --upgrade tox tox-uv==1.9.0
- uses: pre-commit/[email protected]

- name: Check Protocol Version
Expand Down
41 changes: 12 additions & 29 deletions .github/workflows/pr-tests-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,33 +49,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
- name: Install pip packages
if: steps.changes.outputs.stack == 'true'
run: |
pip install --upgrade pip==24.1 uv==0.2.17
python -m pip install --upgrade pip==24.1
pip install --upgrade uv==0.2.17 tox tox-uv==1.9.0
uv --version
- name: Get pip cache dir
if: steps.changes.outputs.stack == 'true'
id: pip-cache
shell: bash
run: |
echo "dir=$(uv cache dir)" >> $GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v4
if: steps.changes.outputs.stack == 'true'
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-uv-py${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-uv-py${{ matrix.python-version }}
- name: Install tox
if: steps.changes.outputs.stack == 'true'
run: |
pip install --upgrade tox tox-uv==1.9.0
- name: Run syft backend base image building test
if: steps.changes.outputs.stack == 'true'
timeout-minutes: 60
Expand Down Expand Up @@ -113,10 +93,11 @@ jobs:
- name: Upgrade pip
if: steps.changes.outputs.stack == 'true'
run: |
pip install --upgrade pip==24.1 uv==0.2.17
python -m pip install --upgrade pip==24.1
pip install uv==0.2.17
uv --version
- name: Get pip cache dir
- name: Get uv cache dir
if: steps.changes.outputs.stack == 'true'
id: pip-cache
shell: bash
Expand Down Expand Up @@ -200,10 +181,11 @@ jobs:
- name: Upgrade pip
if: steps.changes.outputs.stack == 'true'
run: |
pip install --upgrade pip==24.1 uv==0.2.17
python -m pip install --upgrade pip==24.1
pip install uv==0.2.17
uv --version
- name: Get pip cache dir
- name: Get uv cache dir
if: steps.changes.outputs.stack == 'true'
id: pip-cache
shell: bash
Expand Down Expand Up @@ -353,10 +335,11 @@ jobs:
- name: Upgrade pip
if: steps.changes.outputs.stack == 'true'
run: |
pip install --upgrade pip==24.1 uv==0.2.17
python -m pip install --upgrade pip==24.1
pip install uv==0.2.17
uv --version
- name: Get pip cache dir
- name: Get uv cache dir
if: steps.changes.outputs.stack == 'true'
id: pip-cache
shell: bash
Expand Down
29 changes: 9 additions & 20 deletions .github/workflows/pr-tests-syft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,14 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
- name: Install pip packages
if: steps.changes.outputs.syft == 'true'
run: |
python -m pip install --upgrade pip==24.1
pip install --upgrade uv==0.2.17 tox tox-uv==1.9.0
uv --version
- name: Install uv
if: steps.changes.outputs.syft == 'true'
run: |
python -m pip install uv==0.2.17
python -m pip show uv
where uv || which uv
- name: Get pip cache dir
- name: Get uv cache dir
id: pip-cache
if: steps.changes.outputs.syft == 'true'
shell: bash
Expand All @@ -96,11 +91,6 @@ jobs:
# with:
# set-host: true

- name: Install Dependencies
if: steps.changes.outputs.syft == 'true'
run: |
pip install --upgrade tox tox-uv==1.9.0
- name: Run unit tests
if: steps.changes.outputs.syft == 'true'
run: |
Expand Down Expand Up @@ -166,11 +156,10 @@ jobs:
- name: Upgrade pip
if: steps.changes.outputs.syft == 'true' || steps.changes.outputs.notebooks == 'true'
run: |
pip install --upgrade pip==24.1
pip install uv==0.2.17
uv --version
- name: Get pip cache dir
- name: Get uv cache dir
id: pip-cache
if: steps.changes.outputs.syft == 'true' || steps.changes.outputs.notebooks == 'true'
shell: bash
Expand Down Expand Up @@ -249,10 +238,10 @@ jobs:
- name: Upgrade pip
if: steps.changes.outputs.stack == 'true' || steps.changes.outputs.notebooks == 'true'
run: |
pip install --upgrade pip==24.1 uv==0.2.17
pip install uv==0.2.17
uv --version
- name: Get pip cache dir
- name: Get uv cache dir
id: pip-cache
if: steps.changes.outputs.stack == 'true' || steps.changes.outputs.notebooks == 'true'
shell: bash
Expand Down Expand Up @@ -350,10 +339,10 @@ jobs:
- name: Upgrade pip
if: steps.changes.outputs.syft == 'true'
run: |
pip install --upgrade pip==24.1 uv==0.2.17
pip install uv==0.2.17
uv --version
- name: Get pip cache dir
- name: Get uv cache dir
if: steps.changes.outputs.syft == 'true'
id: pip-cache
shell: bash
Expand Down

0 comments on commit 071e6e6

Please sign in to comment.