This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull request validation (main) | |
on: | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: pr-main-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
screenshot-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Run screenshot tests | |
id: run-screenshot-tests | |
run: ./gradlew verifyPaparazziDebug | |
- name: Process failed screenshot tests | |
if: failure() | |
id: failed-screenshots | |
run: "./.github/workflows/scripts/process_failed_screenshots.sh" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} | |
PR_BRANCH: ${{ github.head_ref }} | |
- name: Comment PR if screenshot tests failed | |
uses: octokit/request-action@v2.0.0 | |
if: always() && steps.failed-screenshots.outputs.PR_COMMENT | |
with: | |
route: POST /repos/:repo/issues/:issue_number/comments | |
repo: ${{ github.repository }} | |
issue_number: ${{ steps.failed-screenshots.outputs.PR_NUMBER }} | |
body: ${{ steps.failed-screenshots.outputs.PR_COMMENT }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment