Skip to content

Commit a77cdb3

Browse files
Merge pull request #532 from Facets-cloud/fix/workflow-venv-master
fix: use venv for Python deps in all CI workflows (PEP 668)
2 parents a277f5d + 6c2720f commit a77cdb3

4 files changed

Lines changed: 14 additions & 10 deletions

File tree

.github/workflows/cleanup.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ jobs:
2929
echo '${{ toJson(secrets) }}' > secrets.json
3030
3131
- name: Install dependencies
32-
run: pip install -r .github/workflows/innersourcing/requirements.txt
32+
run: |
33+
python3 -m venv .venv
34+
.venv/bin/pip install -r .github/workflows/innersourcing/requirements.txt
3335
3436
- name: Execute cleanup script
3537
run: |
3638
set -e
3739
set -o pipefail
3840
export GITHUB_REF_NAME="${{ github.event_name == 'workflow_dispatch' && github.ref_name || github.event.pull_request.head.ref }}"
3941
echo "Exporting GITHUB_REF_NAME: $GITHUB_REF_NAME"
40-
python3 .github/workflows/innersourcing/cleanup.py
42+
.venv/bin/python3 .github/workflows/innersourcing/cleanup.py

.github/workflows/outputs-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ jobs:
3131

3232
- name: Install dependencies
3333
run: |
34-
python -m pip install --upgrade pip
35-
pip install -r .github/workflows/innersourcing/requirements.txt
34+
python3 -m venv .venv
35+
.venv/bin/pip install -r .github/workflows/innersourcing/requirements.txt
3636
3737
- name: Generate Output Trees
3838
env:
3939
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
4040
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4141
S3_BUCKET_NAME: ${{ vars.FACETS_MODULES_BUCKET_NAME }}
4242
DRY_RUN: ${{ github.event.inputs.dry_run || 'false' }}
43-
run: python .github/workflows/innersourcing/generate_output_trees.py
43+
run: .venv/bin/python .github/workflows/innersourcing/generate_output_trees.py

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ jobs:
2424

2525
- name: Install dependencies
2626
run: |
27-
python -m pip install --upgrade pip
28-
pip install -r .github/workflows/innersourcing/requirements.txt
27+
python3 -m venv .venv
28+
.venv/bin/pip install -r .github/workflows/innersourcing/requirements.txt
2929
3030
- name: Generate Module Zips
3131
env:
3232
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
3333
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
3434
S3_BUCKET_NAME: ${{ vars.FACETS_MODULES_BUCKET_NAME }}
35-
run: python .github/workflows/innersourcing/zip_modules.py
35+
run: .venv/bin/python .github/workflows/innersourcing/zip_modules.py
3636

3737
- name: Post Success to a Slack channel
3838
id: slack

.github/workflows/validate-bootstrapper.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
uses: actions/checkout@v2
2424

2525
- name: Install dependencies
26-
run: pip install -r .github/workflows/innersourcing/requirements.txt
26+
run: |
27+
python3 -m venv .venv
28+
.venv/bin/pip install -r .github/workflows/innersourcing/requirements.txt
2729
2830
- name: Run validate-bootstrapper script
2931
id: run
@@ -32,7 +34,7 @@ jobs:
3234
ROOT_TOKEN: ${{ secrets.ROOT_TOKEN }}
3335
run: |
3436
set +e
35-
python -u .github/workflows/innersourcing/validate_bootstrapper.py 2>&1 | tee script_output.txt
37+
.venv/bin/python -u .github/workflows/innersourcing/validate_bootstrapper.py 2>&1 | tee script_output.txt
3638
exit_status=${PIPESTATUS[0]}
3739
output=$(cat script_output.txt)
3840

0 commit comments

Comments
 (0)