diff --git a/tools/actions/composites/update-snapshots-desktop/action.yml b/tools/actions/composites/update-snapshots-desktop/action.yml index 818bbe3aa934..f9fbbf67651b 100644 --- a/tools/actions/composites/update-snapshots-desktop/action.yml +++ b/tools/actions/composites/update-snapshots-desktop/action.yml @@ -11,49 +11,54 @@ inputs: runs: using: "composite" steps: - # - name: Update playwright snapshots [Linux => xvfb-run] - # 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 [Linux => xvfb-run] + 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: Update playwright snapshots + if: ${{ !startsWith(inputs.os, 'ubuntu') }} + run: | + pnpm desktop test:playwright:update-snapshots + shell: bash - # - 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 (Linux | macOS) + if: ${{ !startsWith(inputs.os, 'windows') }} + id: status + run: | + echo "status=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT + shell: bash - # - name: Status (Windows) - # id: status-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 + - name: Status (Windows) + id: status-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)" - # shell: bash + - id: changes + run: | + echo ${{ steps.status.outputs.status }} + echo "changes=$(git status -s)" + shell: bash + + - name: Echo git status + run: git status + shell: bash - - name: Create a dummy file + - name: Add changed files run: | -<<<<<<< Updated upstream - git pull --rebase - echo "This is a dummy file" > dummy.txt -======= ->>>>>>> Stashed changes - git add . + git stash -u git pull --rebase + git stash pop + git add ./apps/ledger-live-desktop/tests/specs + shell: bash + + - name: Echo git status 2 + run: git status shell: bash - name: Get current branch @@ -61,26 +66,17 @@ runs: run: echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV shell: bash - - uses: planetscale/ghcommit-action@v0.1.6 + - name: Commit file + uses: planetscale/ghcommit-action@v0.1.6 + if: ${{ steps.status.outputs.status != 0 || steps.status-windows.outputs.status != 0 }} with: - commit_message: "test commit" + commit_message: "test(lld): update screenshots (${{ inputs.os }}) ${{ steps.changes.outputs.changes }} lld, test, screenshot" repo: ${{ github.repository }} branch: ${{ env.branch }} - file_pattern: '*.txt' + file_pattern: '*' env: GITHUB_TOKEN: ${{ inputs.token }} - # - name: Commit file - # uses: swinton/commit@v2.0.0 - # if: ${{ steps.status.outputs.status != 0 || steps.status-windows.outputs.status != 0 }} - # env: - # GH_TOKEN: ${{ inputs.token }} - # with: - # files: | - # $(git status --porcelain | awk '{print $2}' | sed 's/^/ /') - # commit-message: "test(lld): update screenshots (${{ inputs.os }}) ${{ steps.changes.outputs.changes }} lld, test, screenshot" - # ref: $(git branch --show-current) - - name: Upload playwright results [On Failure] uses: actions/upload-artifact@v4 if: failure() && !cancelled()