PLASMA-6522: test(sdds-acore/testing): Textskeleton screneshot tests #529
This file contains hidden or 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: 'Verify screenshots' | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - develop | |
| - feature/* | |
| - bugfix/* | |
| concurrency: | |
| # New commit on branch cancels running workflows of the same branch | |
| group: ${{ github.workflow }}-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| detect_changes: | |
| name: Detect changes | |
| uses: ./.github/workflows/detect-changes.yml | |
| test: | |
| runs-on: macos-latest | |
| needs: detect_changes | |
| if: ${{ join(fromJson(needs.detect_changes.outputs.changed_tokens)) != '' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| module: ${{ fromJson(needs.detect_changes.outputs.changed_tokens) }} | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@v4 | |
| - name: Prepare environment | |
| uses: ./.github/actions/prepare-android-env | |
| - name: Get module dir | |
| id: module_dir | |
| run: | | |
| module="${{ matrix.module }}" | |
| module="${module#:}" | |
| safe_path="${module//:/\/}" | |
| safe_path="$(echo "$safe_path" | tr '\\' '/')" | |
| echo "dir=$safe_path" >> $GITHUB_OUTPUT | |
| safe_name="${module//:/-}" | |
| safe_name="${safe_name//\//-}" | |
| safe_name="${safe_name//\\/-}" | |
| echo "name=$safe_name" >> $GITHUB_OUTPUT | |
| - name: verify screenshots | |
| id: verify-test | |
| run: | | |
| # If there is a difference between the screenshots, the test will fail. | |
| ./gradlew ${{ matrix.module }}:verifyRoborazziDebug --stacktrace | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: screenshot-diff-${{ steps.module_dir.outputs.name }} | |
| if-no-files-found: ignore | |
| path: ${{ steps.module_dir.outputs.dir }}/build/outputs/roborazzi | |
| retention-days: 30 | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: screenshot-diff-reports-${{ steps.module_dir.outputs.name }} | |
| if-no-files-found: ignore | |
| path: ${{ steps.module_dir.outputs.dir }}/build/reports | |
| retention-days: 30 | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: screenshot-diff-test-results-${{ steps.module_dir.outputs.name }} | |
| if-no-files-found: ignore | |
| path: ${{ steps.module_dir.outputs.dir }}/build/test-results | |
| retention-days: 30 |