diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 5d941d2bb3b..a4bdc933341 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -117,6 +117,14 @@ jobs: shell: bash -l {0} run: make test PYTEST_EXTRA="-r P" + # Upload diff images on test failure + - name: Upload diff images if any test fails + uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: artifact-${{ runner.os }}-${{ matrix.python-version }} + path: tmp-test-dir-with-unique-name + # Build the documentation - name: Build the documentation shell: bash -l {0} diff --git a/.github/workflows/ci_tests_dev.yaml b/.github/workflows/ci_tests_dev.yaml index 98790ab96aa..da78e5eb81c 100644 --- a/.github/workflows/ci_tests_dev.yaml +++ b/.github/workflows/ci_tests_dev.yaml @@ -86,3 +86,11 @@ jobs: # Run the tests - name: Test with pytest run: make test PYTEST_EXTRA="-r P" + + # Upload diff images on test failure + - name: Upload diff images if any test fails + uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: artifact-GMT-${{ matrix.gmt_git_ref }}-${{ runner.os }} + path: tmp-test-dir-with-unique-name