feat: Add fill done drawable #79
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: PR checks | |
on: | |
issue_comment: | |
types: [ created, edited ] | |
pull_request: | |
branches: | |
- master | |
- dev | |
jobs: | |
test: | |
if: github.event_name == 'pull_request' || (github.event_name == 'issue_comment' && contains(github.event.comment.html_url, '/pull/') && github.event.comment.body == '!snapshot') | |
name: Test against snapshots | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
lfs: true | |
- name: Set up Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Gradle - Regular checks | |
run: ./gradlew ktlintCheck clean buildDebug | |
- name: Gradle - Verify snapshots with Paparazzi | |
id: snapshotTestStep | |
run: ./gradlew snapshot-test:verifyPaparazziDebug | |
# always() is needed in steps that we want to conditionally run since otherwise they will never | |
# run if the CI run fails above | |
- name: Upload snapshot failure deltas | |
if: always() && steps.snapshotTestStep.outcome == 'failure' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: snapshot-failure-deltas | |
path: snapshot-test/build/paparazzi/failures/delta-*.png | |
- name: Find PR number | |
uses: jwalton/gh-find-current-pr@v1 | |
id: findPr | |
if: always() && (steps.snapshotTestStep.outcome == 'failure' || steps.snapshotTestStep.outcome == 'success') | |
with: | |
state: open | |
- name: Find Comment on PR | |
uses: peter-evans/find-comment@v1 | |
id: fc | |
if: always() && (steps.snapshotTestStep.outcome == 'failure' || steps.snapshotTestStep.outcome == 'success') | |
with: | |
issue-number: ${{ steps.findPr.outputs.pr }} | |
comment-author: 'github-actions[bot]' | |
body-includes: Snapshot testing result | |
- name: Create or update comment on PR (Success) | |
uses: peter-evans/create-or-update-comment@v1 | |
if: always() && steps.snapshotTestStep.outcome == 'success' | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ steps.findPr.outputs.pr }} | |
body: | | |
Snapshot testing result: :heavy_check_mark: | |
Everything looks good! | |
edit-mode: replace | |
- name: Create or update comment on PR (Failure) | |
uses: peter-evans/create-or-update-comment@v1 | |
if: always() && steps.snapshotTestStep.outcome == 'failure' | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ steps.findPr.outputs.pr }} | |
body: | | |
Snapshot testing result: :x: | |
Some of the snapshot tests seem to have failed. Please: | |
- Head over to the artifacts section of the [CI Run](https://github.com/loukwn/StageStepBar/actions/runs/${{ github.run_id }}). | |
- Download the zip. | |
- Unzip and you can find one or more images that show the expected and the actual test results. | |
- If these changes are fixing an issue or are part of a new feature then please speak to the maintainer. If they are not intended then please fix them and repush again. | |
edit-mode: replace |