Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e79d051

Browse files
committed
TST: Add future dependency tests as a weekly CI job
Test future numpy and pandas versions with Matplotlib to see if anything needs to be done in the future to address deprecations or other pending changes.
1 parent e73b1be commit e79d051

File tree

1 file changed

+166
-0
lines changed

1 file changed

+166
-0
lines changed
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
name: Test upcoming dependencies
2+
3+
on:
4+
schedule:
5+
- cron: "47 3 * * 6"
6+
7+
env:
8+
NO_AT_BRIDGE: 1 # Necessary for GTK3 interactive test.
9+
OPENBLAS_NUM_THREADS: 1
10+
PYTHONFAULTHANDLER: 1
11+
12+
jobs:
13+
test:
14+
name: "Python ${{ matrix.python-version }}"
15+
runs-on: ubuntu-latest
16+
permissions:
17+
issues: write
18+
if: github.repository == 'matplotlib/matplotlib'
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
python-version: ["3.9", "3.10"]
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
35+
- name: Install OS dependencies
36+
run: |
37+
sudo apt-get update -yy
38+
sudo apt-get install -yy \
39+
ccache \
40+
cm-super \
41+
dvipng \
42+
ffmpeg \
43+
fonts-noto-cjk \
44+
gdb \
45+
gir1.2-gtk-3.0 \
46+
graphviz \
47+
inkscape \
48+
lcov \
49+
libcairo2 \
50+
libcairo2-dev \
51+
libffi-dev \
52+
libgeos-dev \
53+
libgirepository1.0-dev \
54+
libopengl0 \
55+
libsdl2-2.0-0 \
56+
libxkbcommon-x11-0 \
57+
libxcb-icccm4 \
58+
libxcb-image0 \
59+
libxcb-keysyms1 \
60+
libxcb-randr0 \
61+
libxcb-render-util0 \
62+
libxcb-xinerama0 \
63+
lmodern \
64+
fonts-freefont-otf \
65+
texlive-pictures \
66+
pkg-config \
67+
qtbase5-dev \
68+
texlive-fonts-recommended \
69+
texlive-latex-base \
70+
texlive-latex-extra \
71+
texlive-latex-recommended \
72+
texlive-luatex \
73+
texlive-xetex \
74+
ttf-wqy-zenhei
75+
76+
- name: Install Python dependencies
77+
run: |
78+
# Upgrade pip and setuptools and wheel to get as clean an install as
79+
# possible.
80+
python -m pip install --upgrade pip setuptools wheel
81+
82+
# Install dependencies from PyPI.
83+
python -m pip install --upgrade $PRE \
84+
cycler fonttools kiwisolver packaging pillow pyparsing \
85+
python-dateutil setuptools-scm \
86+
-r requirements/testing/all.txt \
87+
-r requirements/testing/extra.txt
88+
89+
# Install optional dependencies from PyPI.
90+
# Sphinx is needed to run sphinxext tests
91+
python -m pip install --upgrade sphinx
92+
93+
# GUI toolkits are pip-installable only for some versions of Python
94+
# so don't fail if we can't install them. Make it easier to check
95+
# whether the install was successful by trying to import the toolkit
96+
# (sometimes, the install appears to be successful but shared
97+
# libraries cannot be loaded at runtime, so an actual import is a
98+
# better check).
99+
# PyGObject, pycairo, and cariocffi do not install on OSX 10.12.
100+
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
101+
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
102+
echo 'PyGObject is available' ||
103+
echo 'PyGObject is not available'
104+
105+
# There are no functioning wheels available for OSX 10.12 (as of
106+
# Sept 2020) for either pyqt5 (there are only wheels for 10.13+) or
107+
# pyside2 (the latest version (5.13.2) with 10.12 wheels has a
108+
# fatal to us bug, it was fixed in 5.14.0 which has 10.13 wheels)
109+
python -mpip install --upgrade pyqt5 &&
110+
python -c 'import PyQt5.QtCore' &&
111+
echo 'PyQt5 is available' ||
112+
echo 'PyQt5 is not available'
113+
python -mpip install --upgrade pyqt6 &&
114+
python -c 'import PyQt6.QtCore' &&
115+
echo 'PyQt6 is available' ||
116+
echo 'PyQt6 is not available'
117+
python -mpip install --upgrade pyside6 &&
118+
python -c 'import PySide6.QtCore' &&
119+
echo 'PySide6 is available' ||
120+
echo 'PySide6 is not available'
121+
122+
python -mpip install --upgrade \
123+
-f "https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04" \
124+
wxPython &&
125+
python -c 'import wx' &&
126+
echo 'wxPython is available' ||
127+
echo 'wxPython is not available'
128+
129+
- name: Install the nightly dependencies
130+
run: |
131+
python -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple --upgrade numpy pandas
132+
133+
- name: Install Matplotlib
134+
run: |
135+
git describe
136+
137+
# All dependencies must have been pre-installed, so that the minver
138+
# constraints are held.
139+
python -m pip install --no-deps -e .
140+
141+
- name: Run pytest
142+
run: |
143+
xvfb-run -a python -mpytest -raR -n auto \
144+
--maxfail=50 --timeout=300 --durations=25 --log-level=DEBUG \
145+
-W error::UserWarning
146+
147+
- uses: actions/upload-artifact@v2
148+
if: failure()
149+
with:
150+
name: "${{ matrix.python-version }} ${{ matrix.os }} ${{ matrix.name-suffix }} result images"
151+
path: ./result_images
152+
153+
- name: Create issue on failure
154+
uses: imjohnbo/issue-bot@v3
155+
if: failure()
156+
with:
157+
title: "[TST] Upcoming dependency test failures"
158+
body: |
159+
The weekly build with nightly wheels from numpy and pandas
160+
has failed. Check the logs for any updates that need to be
161+
made in matplotlib.
162+
163+
pinned: false
164+
close-previous: false
165+
env:
166+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)