Skip to content

Added CircleCI configuration #77

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

Closed
wants to merge 5 commits into from
Closed
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
45 changes: 45 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: 2

steps: &steps
- checkout
- run:
name: Run tests
command: MPLBACKEND=Agg pytest tests --mpl

jobs:

image-tests-mpl153:
docker:
- image: astropy/image-tests-py35-mpl153:1.3
steps: *steps

image-tests-mpl202:
docker:
- image: astropy/image-tests-py35-mpl202:1.3
steps: *steps

image-tests-mpl212:
docker:
- image: astropy/image-tests-py35-mpl212:1.3
steps: *steps

image-tests-mpl222:
docker:
- image: astropy/image-tests-py35-mpl222:1.3
steps: *steps

image-tests-mpl300:
docker:
- image: astropy/image-tests-py35-mpl300:1.3
steps: *steps


workflows:
version: 2
tests:
jobs:
- image-tests-mpl153
- image-tests-mpl202
- image-tests-mpl212
- image-tests-mpl222
- image-tests-mpl300
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ __pycache__
*.egg
*.egg-info
.idea
build
dist
Binary file modified tests/baseline/1.5.x/test_dpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline/1.5.x/test_succeeds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/baseline/1.5.x/test_succeeds_remote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline/1.5.x/test_tolerance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline/2.0.x/test_base_style.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline/2.0.x/test_dpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline/2.0.x/test_succeeds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/baseline/2.0.x/test_succeeds_remote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline/2.0.x/test_tolerance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion tests/test_pytest_mpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

baseline_dir = 'baseline'

# NOTE: Matplotlib 2.1.x, 2.2.x, and 3.0.x can all use the baseline images
# from 2.0.x, so we just use those rather than duplicate files.

if MPL_VERSION >= LooseVersion('2'):
baseline_subdir = '2.0.x'
elif MPL_VERSION >= LooseVersion('1.5'):
Expand Down Expand Up @@ -41,7 +44,7 @@ def test_succeeds_remote():

# The following tries an invalid URL first (or at least a URL where the baseline
# image won't exist), but should succeed with the second mirror.
@pytest.mark.mpl_image_compare(baseline_dir='http://www.python.org,' + baseline_dir_remote,
@pytest.mark.mpl_image_compare(baseline_dir='http://www.python.org/,' + baseline_dir_remote,
filename='test_succeeds_remote.png')
def test_succeeds_faulty_mirror():
fig = plt.figure()
Expand Down