diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b556aeb..7eeebff3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,8 @@ jobs: run: dotnet run --project tests/Titano.App.Tests -c Release --no-build -- --junit out/junit/app.xml - name: Screenshots - if: runner.os == 'Windows' + # Also after a failed test step: the pictures are what explains a failing screen test. + if: runner.os == 'Windows' && !cancelled() timeout-minutes: 10 run: | set +e @@ -148,17 +149,20 @@ jobs: screenshots: name: Screenshots branch # Same-repository pull requests only: forks never get a writable token. - if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }} needs: build runs-on: ubuntu-latest permissions: contents: write steps: - uses: actions/download-artifact@v4 + # Absent when the build broke before the capture step: nothing to publish then. + continue-on-error: true with: name: screenshots path: screenshots - name: Publish to the ci-screenshots branch (one commit, overwritten each run) + if: hashFiles('screenshots/*.png') != '' working-directory: screenshots run: | git init -q -b ci-screenshots