Skip to content

ci: Preload existing test images from text-overhaul-figures branch #30231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: text-overhaul
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,25 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Preload test images
run: |
git config --global user.name 'Matplotlib'
git config --global user.email 'nobody@matplotlib.org'
git fetch https://github.com/QuLogic/matplotlib.git text-overhaul-figures:text-overhaul-figures
git merge --no-commit text-overhaul-figures || true
# If there are any conflicts in baseline images, then pick "ours",
# which should be the updated images in the PR.
conflicts=$(git diff --name-only --diff-filter=U \
lib/matplotlib/tests/baseline_images \
lib/mpl_toolkits/*/tests/baseline_images)
if [ -n "${conflicts}" ]; then
git checkout --ours -- "${conflicts}"
git add -- "${conflicts}"
fi
# If committing fails, there were conflicts other than the baseline images,
# which should not be allowed to happen, and should fail the build.
git commit -m 'Preload test images from branch text-overhaul-figures'

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
Expand Down
19 changes: 19 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,25 @@ stages:
architecture: 'x64'
displayName: 'Use Python $(python.version)'

- bash: |
git config --global user.name 'Matplotlib'
git config --global user.email 'nobody@matplotlib.org'
git fetch https://github.com/QuLogic/matplotlib.git text-overhaul-figures:text-overhaul-figures
git merge --no-commit text-overhaul-figures || true
# If there are any conflicts in baseline images, then pick "ours",
# which should be the updated images in the PR.
conflicts=$(git diff --name-only --diff-filter=U \
lib/matplotlib/tests/baseline_images \
lib/mpl_toolkits/*/tests/baseline_images)
if [ -n "${conflicts}" ]; then
git checkout --ours -- "${conflicts}"
git add -- "${conflicts}"
fi
# If committing fails, there were conflicts other than the baseline images,
# which should not be allowed to happen, and should fail the build.
git commit -m 'Preload test images from branch text-overhaul-figures'
displayName: Preload test images

- bash: |
choco install ninja
displayName: 'Install dependencies'
Expand Down
Loading