Skip to content

Commit

Permalink
Try running all python tests without deps
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig committed Apr 14, 2023
1 parent cf0b921 commit 899676d
Show file tree
Hide file tree
Showing 7 changed files with 382 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .github/actions/smoke-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ runs:
cache: 'pip'
cache-dependency-path: |
build/test-requirements.txt
build/test-python-requirements.txt
requirements.txt
build/smoke-test-requirements.txt
Expand All @@ -40,6 +41,7 @@ runs:
- name: pip install system test requirements
run: |
python -m pip install --upgrade -r build/test-requirements.txt
python -m pip install --upgrade -r build/test-python-requirements.txt
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --implementation py --no-deps --upgrade --pre debugpy
shell: bash

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:
run: |
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
python -m pip install --upgrade -r build/test-requirements.txt
python -m pip install --upgrade -r build/test-python-requirements.txt
- name: Run Pyright
uses: jakebailey/pyright-action@v1
Expand Down Expand Up @@ -167,6 +168,11 @@ jobs:

- name: Install test requirements
run: python -m pip install --upgrade -r build/test-requirements.txt
if: matrix.test-suite != 'python-unit'

- name: Install python test requirements
run: python -m pip install --upgrade -r build/test-python-requirements.txt
if: matrix.test-suite == 'python-unit'

- name: Install debugpy wheels (Python ${{ matrix.python }})
run: |
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
run: |
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
python -m pip install --upgrade -r build/test-requirements.txt
python -m pip install --upgrade -r build/test-python-requirements.txt
- name: Run Pyright
uses: jakebailey/pyright-action@v1
Expand Down Expand Up @@ -142,6 +143,11 @@ jobs:

- name: Install test requirements
run: python -m pip install --upgrade -r build/test-requirements.txt
if: matrix.test-suite != 'python-unit'

- name: Install Python test requirements
run: python -m pip install --upgrade -r build/test-python-requirements.txt
if: matrix.test-suite == 'python-unit'

- name: Install debugpy wheels (Python ${{ matrix.python }})
run: |
Expand Down Expand Up @@ -338,6 +344,7 @@ jobs:
requirements.txt
pythonFiles/jedilsp_requirements/requirements.txt
build/test-requirements.txt
build/test-python-requirements.txt
build/functional-test-requirements.txt
- name: Install base Python requirements
Expand All @@ -356,6 +363,15 @@ jobs:
# 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.
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --implementation py --no-deps --upgrade --pre debugpy
- name: Install Python test requirements
run: python -m pip install --upgrade -r build/test-python-requirements.txt

- name: Run Python unit tests
# Run this test before installing more dependencies.
# some package cause interference when testing pytest session under pytest session
# like for pytest plugin tests.
run: python pythonFiles/tests/run_all.py

- name: Install test requirements
run: python -m pip install --upgrade -r build/test-requirements.txt

Expand Down Expand Up @@ -428,10 +444,6 @@ jobs:
- name: Run TypeScript unit tests
run: npm run test:unittests:cover

- name: Run Python unit tests
run: |
python pythonFiles/tests/run_all.py
# The virtual environment based tests use the `testSingleWorkspace` set of tests
# with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`,
# which is set in the "Prepare environment for venv tests" step.
Expand Down
1 change: 1 addition & 0 deletions build/test-python-requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest
28 changes: 28 additions & 0 deletions build/test-python-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
#
# pip-compile 'build\test-python-requirements.in'
#
colorama==0.4.6
# via pytest
exceptiongroup==1.1.1
# via pytest
importlib-metadata==6.3.0
# via
# pluggy
# pytest
iniconfig==2.0.0
# via pytest
packaging==23.1
# via pytest
pluggy==1.0.0
# via pytest
pytest==7.3.0
# via -r build\test-python-requirements.in
tomli==2.0.1
# via pytest
typing-extensions==4.5.0
# via importlib-metadata
zipp==3.15.0
# via importlib-metadata
27 changes: 27 additions & 0 deletions build/test-requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# pin setoptconf to prevent issue with 'use_2to3'
setoptconf==0.3.0

# Install flake8 first, as both flake8 and autopep8 require pycodestyle,
# but flake8 has a tighter pinning.
flake8
autopep8
bandit
black
yapf
pylint
pycodestyle
pydocstyle
prospector
pytest
flask
fastapi
uvicorn
django
isort

# Integrated TensorBoard tests
tensorboard
torch-tb-profiler

# extension build tests
freezegun
Loading

0 comments on commit 899676d

Please sign in to comment.