From 32da10ac62e4d2bddf6877c1acdf9768f23e34b7 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:52:07 -0500 Subject: [PATCH] Auto-cancel duplicate CI and remove unnecessary pytest version check I added earlier. --- .github/workflows/test_and_publish.yml | 4 ++++ pytest_mpl/plugin.py | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_and_publish.yml b/.github/workflows/test_and_publish.yml index 9a3c898..e2519a7 100644 --- a/.github/workflows/test_and_publish.yml +++ b/.github/workflows/test_and_publish.yml @@ -13,6 +13,10 @@ on: # Allow manual runs through the web UI workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 diff --git a/pytest_mpl/plugin.py b/pytest_mpl/plugin.py index 7b59184..c5b9574 100644 --- a/pytest_mpl/plugin.py +++ b/pytest_mpl/plugin.py @@ -57,11 +57,7 @@ Actual shape: {actual_shape} {actual_path}""" -_pytest_version = Version(pytest.__version__) -PYTEST_LT_7 = _pytest_version < Version("7.0.0") -PYTEST_GE_8_0 = any([_pytest_version.is_devrelease, - _pytest_version.is_prerelease, - _pytest_version >= Version('8.0')]) +PYTEST_LT_7 = Version(pytest.__version__) < Version("7.0.0") # The following are the subsets of formats supported by the Matplotlib image # comparison machinery