Skip to content

Commit 099f446

Browse files
kmcgradyakramsystems
authored andcommitted
Activate venv before pip install (streamlit#10334)
## Describe your changes Our Github actions fail because our venv is no longer being activated on its own? As a result, we need to make sure we activate the venv each time. I mapped out where we did that and source activate it to make sure it works. ## Testing Plan - CI should pass --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
1 parent 6470807 commit 099f446

9 files changed

+39
-13
lines changed

.github/workflows/component-template-e2e-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ jobs:
4242
uses: ./.github/actions/make_init
4343

4444
- name: Run make develop
45-
run: make develop
45+
run: |
46+
source venv/bin/activate
47+
make develop
4648
4749
- name: Build Package
4850
timeout-minutes: 120

.github/workflows/ensure-relative-imports.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ jobs:
4343
- name: Setup virtual env
4444
uses: ./.github/actions/make_init
4545
- name: Run make develop
46-
run: make develop
46+
run: |
47+
source venv/bin/activate
48+
make develop
49+
4750
- name: Run make protobuf
4851
run: make protobuf
4952
- name: Run make frontend-lib-prod

.github/workflows/js-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ jobs:
4242
- name: Setup virtual env
4343
uses: ./.github/actions/make_init
4444
- name: Run make develop
45-
run: make develop
45+
run: |
46+
source venv/bin/activate
47+
make develop
4648
- name: Run make protobuf
4749
run: make protobuf
4850
- name: Run make frontend-lib

.github/workflows/nightly.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ jobs:
4040
- name: Setup virtual env
4141
uses: ./.github/actions/make_init
4242
- name: Run make develop
43-
run: make develop
43+
run: |
44+
source venv/bin/activate
45+
make develop
46+
4447
- name: Create tag
4548
id: create_tag
4649
run: |
@@ -159,7 +162,9 @@ jobs:
159162
- name: Setup virtual env
160163
uses: ./.github/actions/make_init
161164
- name: Run make develop
162-
run: make develop
165+
run: |
166+
source venv/bin/activate
167+
make develop
163168
- name: Verify git tag vs. version
164169
env:
165170
TAG: ${{ needs.create-nightly-tag.outputs.tag }}

.github/workflows/notify-about-new-emojis-material-icons.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ jobs:
3232
uses: ./.github/actions/make_init
3333

3434
- name: Run make develop
35-
run: make develop
36-
35+
run: |
36+
source venv/bin/activate
37+
make develop
3738
- name: Install newest version of emoji package
3839
run: pip install emoji --upgrade
3940

.github/workflows/playwright-custom-components.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ jobs:
4646
- name: Run make frontend
4747
run: make frontend
4848
- name: Run make playwright-custom-components
49-
run: make playwright-custom-components
49+
run: |
50+
source venv/bin/activate
51+
make playwright-custom-components
5052
- name: Upload failed test results
5153
uses: actions/upload-artifact@v4
5254
if: always()

.github/workflows/pr-preview.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
7474
# To create a consistent location for the release/demo whl file, we need a
7575
# stagnent version number (streamlit-11.11.11)
7676
run: |
77+
source venv/bin/activate
7778
# Install awscli via pip/uv:
7879
uv pip install awscli==1.37.6
7980

.github/workflows/python-min-deps.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,15 @@ jobs:
5656
with:
5757
use_cached_venv: false
5858
- name: Install min dependencies (force reinstall)
59-
run: uv pip install -r lib/min-constraints-gen.txt --force-reinstall
59+
run: |
60+
source venv/bin/activate
61+
uv pip install -r lib/min-constraints-gen.txt --force-reinstall
6062
- name: Generate Protobufs
6163
run: make protobuf
6264
- name: Make local modules visible
63-
run: uv pip install --editable ./lib --no-deps
65+
run: |
66+
source venv/bin/activate
67+
uv pip install --editable ./lib --no-deps
6468
- name: Run Python Tests
6569
run: make pytest
6670
- name: CLI Smoke Tests

.github/workflows/python-tests.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ jobs:
105105
- name: Setup virtual env
106106
uses: ./.github/actions/make_init
107107
- name: Run make develop
108-
run: make develop
108+
run: |
109+
source venv/bin/activate
110+
make develop
109111
- name: Run Linters
110112
run: make pylint
111113
env:
@@ -238,9 +240,13 @@ jobs:
238240
# which might cause some unexpected issues with dependencies.
239241
use_cached_venv: false
240242
- name: Run make develop
241-
run: make develop
243+
run: |
244+
source venv/bin/activate
245+
make develop
242246
- name: Install integration dependencies
243-
run: uv pip install -r lib/integration-requirements.txt --force-reinstall
247+
run: |
248+
source venv/bin/activate
249+
uv pip install -r lib/integration-requirements.txt --force-reinstall
244250
- name: Run Python integration tests
245251
run: make pytest-integration
246252
env:

0 commit comments

Comments
 (0)