Skip to content

Update README.md

Update README.md #13

name: StoreScreenshot
# プルリクエストのスクリーンショットを保存するワークフロー
on:
push:
branches:
- main
pull_request:
permissions: {}
jobs:
store-screenshot-test:
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read # for clone
actions: write # for upload-artifact
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK 17
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
distribution: temurin
java-version: 17
# Better than caching and/or extensions of actions/setup-java
- name: Setup Gradle
uses: gradle/gradle-build-action@87a9a15658c426a54dd469d4fc7dc1a73ca9d4a6 # v2.10.0
with:
gradle-version: wrapper
- name: record screenshot
id: record-test
run: |
# Use --rerun-tasks to disable cache for test task
./gradlew recordRoborazziDebug --stacktrace --rerun-tasks
# Upload artifacts
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: screenshot
path: |
**/build/outputs/roborazzi
retention-days: 30
# Upload reports
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: screenshot-reports
path: |
**/build/reports
retention-days: 30
# Upload test results
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: screenshot-test-results
path: |
**/build/test-results
retention-days: 30