@@ -125,15 +125,23 @@ jobs:
125
125
python-version : " 3.10"
126
126
cache : pip
127
127
cache-dependency-path : requirements-tests.txt
128
- - name : Install external dependencies for 3rd-party stubs
128
+ - name : Install typeshed test-suite requirements
129
+ # Install these so we can run `get_external_stub_requirements.py`
130
+ run : pip install -r requirements-tests.txt
131
+ - name : Create an isolated venv for testing
132
+ run : python -m venv .venv
133
+ - name : Install 3rd-party stub dependencies
129
134
run : |
130
- pip install -r requirements-tests.txt
131
135
DEPENDENCIES=$(python tests/get_external_stub_requirements.py)
132
136
if [ -n "$DEPENDENCIES" ]; then
137
+ source .venv/bin/activate
133
138
echo "Installing packages: $DEPENDENCIES"
134
139
pip install $DEPENDENCIES
135
140
fi
136
- - run : pip freeze --all
141
+ - name : List 3rd-party stub dependencies installed
142
+ run : |
143
+ source .venv/bin/activate
144
+ pip freeze --all
137
145
- name : Get pyright version
138
146
uses : SebRollen/toml-action@v1.0.2
139
147
id : pyright_version
@@ -147,13 +155,15 @@ jobs:
147
155
python-platform : ${{ matrix.python-platform }}
148
156
python-version : ${{ matrix.python-version }}
149
157
no-comments : ${{ matrix.python-version != '3.10' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy.
158
+ venv-path : .
150
159
- name : Run pyright with stricter settings on some of the stubs
151
160
uses : jakebailey/pyright-action@v1
152
161
with :
153
162
version : ${{ steps.pyright_version.outputs.value }}
154
163
python-platform : ${{ matrix.python-platform }}
155
164
python-version : ${{ matrix.python-version }}
156
165
no-comments : ${{ matrix.python-version != '3.10' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy.
166
+ venv-path : .
157
167
project : ./pyrightconfig.stricter.json
158
168
- name : Run pyright on the test cases
159
169
uses : jakebailey/pyright-action@v1
@@ -162,6 +172,7 @@ jobs:
162
172
python-platform : ${{ matrix.python-platform }}
163
173
python-version : ${{ matrix.python-version }}
164
174
no-comments : ${{ matrix.python-version != '3.10' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy.
175
+ venv-path : .
165
176
project : ./pyrightconfig.testcases.json
166
177
167
178
stub-uploader :
0 commit comments