Skip to content

Trying to make test less flaky. #916

Trying to make test less flaky.

Trying to make test less flaky. #916

name: PyDev.Debugger TESTS
on:
- push
- pull_request
env:
DISPLAY: ":99"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [
"ubuntu-pypy3",
# "macos-py37-cython", -- misbehaving on github actions
"ubuntu-py38-cython-checkbin",
"windows-py39-cython",
"windows-py310-cython-checkbin",
"windows-py311-cython",
"ubuntu-py311-cython",
"ubuntu-py312-cython-checkbin",
"windows-py312-cython-checkbin",
]
include:
- name: "ubuntu-pypy3"
python: "pypy3.10"
os: ubuntu-20.04
PYDEVD_USE_CYTHON: NO
# - name: "macos-py37-cython"
# python: "3.7"
# os: macos-latest
# PYDEVD_USE_CYTHON: YES
- name: "ubuntu-py38-cython-checkbin"
python: "3.8"
os: ubuntu-20.04
PYDEVD_USE_CYTHON: YES
- name: "windows-py39-cython"
python: "3.9"
os: windows-latest
PYDEVD_USE_CYTHON: YES
- name: "windows-py310-cython-checkbin"
python: "3.10"
os: windows-latest
PYDEVD_USE_CYTHON: YES
# See: https://github.com/actions/python-versions/releases
- name: "windows-py311-cython"
python: "3.11.0"
os: windows-latest
PYDEVD_USE_CYTHON: YES
- name: "ubuntu-py311-cython"
python: "3.11.0"
os: ubuntu-20.04
PYDEVD_USE_CYTHON: YES
- name: "ubuntu-py312-cython-checkbin"
python: "3.12.0"
os: ubuntu-20.04
PYDEVD_USE_CYTHON: YES
- name: "windows-py312-cython-checkbin"
python: "3.12"
os: windows-latest
PYDEVD_USE_CYTHON: YES
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install gdb/xvfb/ptrace_scope
run: |
sudo apt-get update
sudo apt-get install gdb
sudo sysctl kernel.yama.ptrace_scope=0
sudo apt-get install xvfb
sudo apt-get install libqt5x11extras5
Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 &
if: contains(matrix.name, 'ubuntu')
- name: Install common Python deps
run: |
pip install --upgrade pip
pip install setuptools --no-warn-script-location
pip install wheel --no-warn-script-location
pip install "cython>3" --no-warn-script-location
pip install psutil --no-warn-script-location
pip install numpy --no-warn-script-location
pip install pytest --no-warn-script-location
pip install pytest-xdist --no-warn-script-location
pip install psutil --no-warn-script-location
pip install ipython --no-warn-script-location
pip install untangle --no-warn-script-location
- name: Install Python 3.x deps
if: contains(matrix.name, 'py3') && !contains(matrix.name, 'pypy') && !contains(matrix.name, 'py312') && !contains(matrix.name, 'py311')
run: |
pip install PySide2 --no-warn-script-location
pip install cherrypy --no-warn-script-location
pip install gevent greenlet
- name: Install django
if: "!contains(matrix.name, 'py38')"
run: pip install "django<=4.2" --no-warn-script-location
- name: Install Pandas
if: contains(matrix.name, 'py310') && !contains(matrix.name, 'pypy')
# The pandas Styler also requires jinja2.
run: pip install pandas pyarrow jinja2 --no-warn-script-location
- name: Install Pypy 3 deps
if: contains(matrix.name, 'py3')
run: |
pip install trio
- name: Check that wheels can be built
if: contains(matrix.name, 'checkbin') && contains(matrix.name, 'ubuntu')
run: |
python -m pip install cibuildwheel==2.16.2
# Remove these .so files (will be rebuilt)
rm pydevd_attach_to_process/*.so
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp310-*manylinux*x86_64 cp311-*manylinux*x86_64 cp312-*manylinux*x86_64
CIBW_BUILD_VERBOSITY: 1
- name: Check cython unchanged
if: contains(matrix.name, 'checkbin')
env:
PYTHONPATH: .
run: |
python build_tools/build.py
python build_tools/check_no_git_modifications.py
- name: Create cython binaries
if: contains(matrix.name, 'cython')
run: |
python setup_pydevd_cython.py build_ext --inplace
- name: Check debug
if: contains(matrix.name, 'checkdebug')
run: |
./.github/install_and_run_debug_py.sh
- name: Run Python 3.x tests
env:
# QT_DEBUG_PLUGINS: 1
PYTHONPATH: .
PYDEVD_USE_CYTHON: ${{matrix.PYDEVD_USE_CYTHON }}
run: |
python -m pytest -n auto -rfE