Skip to content

Commit

Permalink
Upload artifact only on screenshot validation failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ashdavies committed Dec 9, 2024
1 parent 9ce9874 commit f892e64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SERVER_CLIENT_ID: ${{ secrets.SERVER_CLIENT_ID }}

- run: ./gradlew validateScreenshotTest --console=plain
- id: screenshot-validation
run: ./gradlew validateScreenshotTest --console=plain
env:
ANDROID_API_KEY: ${{ secrets.ANDROID_API_KEY }}
BROWSER_API_KEY: ${{ secrets.BROWSER_API_KEY }}
SERVER_CLIENT_ID: ${{ secrets.SERVER_CLIENT_ID }}

- uses: actions/upload-artifact@v4
if: failure()
if: failure() && steps.screenshot-validation.outcome == "failure"
with:
if-no-files-found: error
name: screenshot-test-report
Expand Down

0 comments on commit f892e64

Please sign in to comment.