diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0936cda..a360d7f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,8 +51,8 @@ jobs: CIBW_BUILD: ${{ matrix.python-version }}${{ matrix.target[1] }} CIBW_BEFORE_BUILD: pip install numpy CIBW_BEFORE_TEST: pip install numpy matplotlib - CIBW_TEST_COMMAND: cd {project}/Python && python advanced_example.py dont_show && python simple_example.py dont_show - CIBW_TEST_COMMAND_WINDOWS: cd /D {project}/Python && python advanced_example.py dont_show && python simple_example.py dont_show + CIBW_TEST_COMMAND: cd {project}/Python && python advanced_example.py no_block && python simple_example.py no_block + CIBW_TEST_COMMAND_WINDOWS: cd /D {project}/Python && python advanced_example.py no_block && python simple_example.py no_block - if: startsWith(github.ref, 'refs/tags/v') name: Upload wheel diff --git a/Python/advanced_example.py b/Python/advanced_example.py index 387a7f3..a438cc6 100644 --- a/Python/advanced_example.py +++ b/Python/advanced_example.py @@ -107,5 +107,4 @@ def plot_bool(axis, x, y, label): plot_bool(axes[10], timestamp, flags[:, 3], "Magnetic recovery") -if len(sys.argv) == 1: # don't show plots when script run by CI - pyplot.show() +pyplot.show(block="no_block" not in sys.argv) # don't block when script run by CI diff --git a/Python/simple_example.py b/Python/simple_example.py index 10af0c1..233fef1 100644 --- a/Python/simple_example.py +++ b/Python/simple_example.py @@ -47,5 +47,4 @@ axes[2].grid() axes[2].legend() -if len(sys.argv) == 1: # don't show plots when script run by CI - pyplot.show() +pyplot.show(block="no_block" not in sys.argv) # don't block when script run by CI