8000 TST: Add future dependency tests as a weekly CI job · matplotlib/matplotlib@3042f7a · GitHub
[go: up one dir, main page]

Skip to content

Commit 3042f7a

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

File tree

1 file changed

+165
-0
lines changed

1 file changed

+165
-0
lines changed
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
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+
# First install the nightly wheels that we want to test against
83+
python -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy
84+
85+
# Install dependencies from PyPI.
86+
python -m pip install --upgrade $PRE \
87+
cycler fonttools kiwisolver packaging pillow pyparsing \
88+
python-dateutil setuptools-scm \
89+
-r requirements/testing/all.txt \
90+
-r requirements/testing/extra.txt
91+
92+
# Install optional dependencies from PyPI.
93+
# Sphinx is needed to run sphinxext tests
94+
python -m pip install --upgrade sphinx
95+
96+
# GUI toolkits are pip-installable only for some versions of Python
97+
# so don't fail if we can't install them. Make it easier to check
98+
# whether the install was successful by trying to import the toolkit
99+
# (sometimes, the install appears to be successful but shared
100+
# libraries cannot be loaded at runtime, so an actual import is a
101+
# better check).
102+
# PyGObject, pycairo, and cariocffi do not install on OSX 10.12.
103+
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
104+
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
105+
echo 'PyGObject is available' ||
106+
echo 'PyGObject is not available'
107+
108+
# There are no functioning wheels available for OSX 10.12 (as of
109+
# Sept 2020) for either pyqt5 (there are only wheels for 10.13+) or
110+
# pyside2 (the latest version (5.13.2) with 10.12 wheels has a
111+
# fatal to us bug, it was fixed in 5.14.0 which has 10.13 wheels)
112+
python -mpip install --upgrade pyqt5 &&
113+
python -c 'import PyQt5.QtCore' &&
114+
echo 'PyQt5 is available' ||
115+
echo 'PyQt5 is not available'
116+
python -mpip install --upgrade pyqt6 &&
117+
python -c 'import PyQt6.QtCore' &&
118+
echo 'PyQt6 is available' ||
119+
echo 'PyQt6 is not available'
120+
python -mpip install --upgrade pyside6 &&
121+
python -c 'import PySide6.QtCore' &&
122+
echo 'PySide6 is available' ||
123+
echo 'PySide6 is not available'
124+
125+
python -mpip install --upgrade \
126+
-f "https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04" \
127+
wxPython &&
128+
python -c 'import wx' &&
129+
echo 'wxPython is available' ||
130+
echo 'wxPython is not available'
131+
132+
- name: Install Matplotlib
133+
run: |
134+
git describe
135+
136+
# All dependencies must have been pre-installed, so that the minver
137+
# constraints are held.
138+
python -m pip install --no-deps -e .
139+
140+
- name: Run pytest
141+
run: |
142+
xvfb-run -a python -mpytest -raR -n auto \
143+
--maxfail=50 --timeout=300 --durations=25 --log-level=DEBUG \
144+
-W error::UserWarning
145+
146+
- uses: actions/upload-artifact@v2
147+
if: failure()
148+
with:
149+
name: "${{ matrix.python-version }} ${{ matrix.os }} ${{ matrix.name-suffix }} result images"
150+
path: ./result_images
151+
152+
- name: Create issue on failure
153+
uses: imjohnbo/issue-bot@v3
154+
if: failure()
155+
with:
156+
title: "[TST] Upcoming dependency test failures"
157+
body: |
158+
The weekly build with nightly wheels from numpy and pandas
159+
has failed. Check the logs for any updates that need to be
160+
made in matplotlib.
161+
162+
pinned: false
163+
close-previous: false
164 3D9F +
env:
165+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)
0