diff --git a/tools/actions/composites/update-snapshots-desktop/action.yml b/tools/actions/composites/update-snapshots-desktop/action.yml index 26cf0d230d9e..23de6341ca04 100644 --- a/tools/actions/composites/update-snapshots-desktop/action.yml +++ b/tools/actions/composites/update-snapshots-desktop/action.yml @@ -12,31 +12,35 @@ runs: if: startsWith(inputs.os, 'ubuntu') run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm desktop test:playwright:update-snapshots shell: bash + - name: Update playwright snapshots if: ${{ !startsWith(inputs.os, 'ubuntu') }} run: pnpm desktop test:playwright:update-snapshots shell: bash - - name: status (Linux | macOS) + + - name: Status (Linux | macOS) if: ${{ !startsWith(inputs.os, 'windows') }} id: status run: | echo "status=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT shell: bash - - name: status (Windows) + + - name: Status (Windows) id: status-windows - if: startsWith(inputs.os, 'windows') + if: ${{ startsWith(inputs.os, 'windows') }} run: | $out = $(git status --porcelain | measure -l | Format-Wide | Out-String -Stream) $out = $out.Trim() echo "status=$out" >> $env:GITHUB_OUTPUT shell: pwsh + - id: changes run: | - echo ${{ steps.status.outputs.status }} - echo "changes=$(git status -s)" + echo "changes=$(git status -s)" >> $GITHUB_OUTPUT shell: bash + - name: Commit snapshots - if: steps.status.outputs.status != 0 || steps.status-windows.outputs.status != 0 + if: ${{ steps.status.outputs.status != 0 || steps.status-windows.outputs.status != 0 }} run: | git add ./apps/ledger-live-desktop/tests/specs && git commit -m "test(lld): update screenshots (${{ inputs.os }}) ${{ steps.changes.outputs.changes }} lld, test, screenshot" && @@ -45,9 +49,10 @@ runs: git push || echo "" shell: bash + - name: Upload playwright results [On Failure] uses: actions/upload-artifact@v4 - if: failure() && !cancelled() + if: ${{ failure() && !cancelled() }} with: name: ${{ format('playwright-results-{0}', inputs.os) }} path: |