Skip to content

Commit

Permalink
Always generate GH Actions test plots
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase committed Aug 30, 2023
1 parent 1e7e438 commit 6d87f8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/pip_install_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
run: |
pytest --mpl -vv tests # test everything
- name: Generate GH Actions test plots
if: always() # always generate the plots, even if the tests fail
run: |
# Generate the test plots in case there were any failures:
pytest --mpl-generate-path=tests/remote_baseline tests/test_plotting.py
pytest --mpl-generate-path=tests/remote_baseline tests/test_shakenbreak.py
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
run: |
pytest --mpl -vv tests # test everything
- name: Generate GH Actions test plots
if: always() # always generate the plots, even if the tests fail
run: |
# Generate the test plots in case there were any failures:
pytest --mpl-generate-path=tests/remote_baseline tests/test_plotting.py
pytest --mpl-generate-path=tests/remote_baseline tests/test_shakenbreak.py
Expand Down
2 changes: 1 addition & 1 deletion shakenbreak/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _get_backend(save_format: str) -> Optional[str]:
backend = None
if "pdf" in save_format:
try:
import cairo
import cairo # noqa: F401

backend = "cairo"
except ImportError:
Expand Down

0 comments on commit 6d87f8d

Please sign in to comment.