Skip to content

Commit 899676d

Browse files
committed
Try running all python tests without deps
1 parent cf0b921 commit 899676d

File tree

7 files changed

+382
-29
lines changed

7 files changed

+382
-29
lines changed

.github/actions/smoke-tests/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ runs:
2525
cache: 'pip'
2626
cache-dependency-path: |
2727
build/test-requirements.txt
28+
build/test-python-requirements.txt
2829
requirements.txt
2930
build/smoke-test-requirements.txt
3031
@@ -40,6 +41,7 @@ runs:
4041
- name: pip install system test requirements
4142
run: |
4243
python -m pip install --upgrade -r build/test-requirements.txt
44+
python -m pip install --upgrade -r build/test-python-requirements.txt
4345
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --implementation py --no-deps --upgrade --pre debugpy
4446
shell: bash
4547

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ jobs:
9999
run: |
100100
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
101101
python -m pip install --upgrade -r build/test-requirements.txt
102+
python -m pip install --upgrade -r build/test-python-requirements.txt
102103
103104
- name: Run Pyright
104105
uses: jakebailey/pyright-action@v1
@@ -167,6 +168,11 @@ jobs:
167168

168169
- name: Install test requirements
169170
run: python -m pip install --upgrade -r build/test-requirements.txt
171+
if: matrix.test-suite != 'python-unit'
172+
173+
- name: Install python test requirements
174+
run: python -m pip install --upgrade -r build/test-python-requirements.txt
175+
if: matrix.test-suite == 'python-unit'
170176

171177
- name: Install debugpy wheels (Python ${{ matrix.python }})
172178
run: |

.github/workflows/pr-check.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
run: |
7474
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
7575
python -m pip install --upgrade -r build/test-requirements.txt
76+
python -m pip install --upgrade -r build/test-python-requirements.txt
7677
7778
- name: Run Pyright
7879
uses: jakebailey/pyright-action@v1
@@ -142,6 +143,11 @@ jobs:
142143

143144
- name: Install test requirements
144145
run: python -m pip install --upgrade -r build/test-requirements.txt
146+
if: matrix.test-suite != 'python-unit'
147+
148+
- name: Install Python test requirements
149+
run: python -m pip install --upgrade -r build/test-python-requirements.txt
150+
if: matrix.test-suite == 'python-unit'
145151

146152
- name: Install debugpy wheels (Python ${{ matrix.python }})
147153
run: |
@@ -338,6 +344,7 @@ jobs:
338344
requirements.txt
339345
pythonFiles/jedilsp_requirements/requirements.txt
340346
build/test-requirements.txt
347+
build/test-python-requirements.txt
341348
build/functional-test-requirements.txt
342349
343350
- name: Install base Python requirements
@@ -356,6 +363,15 @@ jobs:
356363
# We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase.
357364
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --implementation py --no-deps --upgrade --pre debugpy
358365
366+
- name: Install Python test requirements
367+
run: python -m pip install --upgrade -r build/test-python-requirements.txt
368+
369+
- name: Run Python unit tests
370+
# Run this test before installing more dependencies.
371+
# some package cause interference when testing pytest session under pytest session
372+
# like for pytest plugin tests.
373+
run: python pythonFiles/tests/run_all.py
374+
359375
- name: Install test requirements
360376
run: python -m pip install --upgrade -r build/test-requirements.txt
361377

@@ -428,10 +444,6 @@ jobs:
428444
- name: Run TypeScript unit tests
429445
run: npm run test:unittests:cover
430446

431-
- name: Run Python unit tests
432-
run: |
433-
python pythonFiles/tests/run_all.py
434-
435447
# The virtual environment based tests use the `testSingleWorkspace` set of tests
436448
# with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`,
437449
# which is set in the "Prepare environment for venv tests" step.

build/test-python-requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pytest

build/test-python-requirements.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.7
3+
# by the following command:
4+
#
5+
# pip-compile 'build\test-python-requirements.in'
6+
#
7+
colorama==0.4.6
8+
# via pytest
9+
exceptiongroup==1.1.1
10+
# via pytest
11+
importlib-metadata==6.3.0
12+
# via
13+
# pluggy
14+
# pytest
15+
iniconfig==2.0.0
16+
# via pytest
17+
packaging==23.1
18+
# via pytest
19+
pluggy==1.0.0
20+
# via pytest
21+
pytest==7.3.0
22+
# via -r build\test-python-requirements.in
23+
tomli==2.0.1
24+
# via pytest
25+
typing-extensions==4.5.0
26+
# via importlib-metadata
27+
zipp==3.15.0
28+
# via importlib-metadata

build/test-requirements.in

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# pin setoptconf to prevent issue with 'use_2to3'
2+
setoptconf==0.3.0
3+
4+
# Install flake8 first, as both flake8 and autopep8 require pycodestyle,
5+
# but flake8 has a tighter pinning.
6+
flake8
7+
autopep8
8+
bandit
9+
black
10+
yapf
11+
pylint
12+
pycodestyle
13+
pydocstyle
14+
prospector
15+
pytest
16+
flask
17+
fastapi
18+
uvicorn
19+
django
20+
isort
21+
22+
# Integrated TensorBoard tests
23+
tensorboard
24+
torch-tb-profiler
25+
26+
# extension build tests
27+
freezegun

0 commit comments

Comments
 (0)