-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re-add all steps to snapshots action, fix git add and commit params
- Loading branch information
1 parent
1db3fd4
commit d4fa67a
Showing
1 changed file
with
46 additions
and
50 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,76 +11,72 @@ 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 | ||
id: get_branch | ||
run: echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- uses: planetscale/[email protected] | ||
- name: Commit file | ||
uses: planetscale/[email protected] | ||
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/[email protected] | ||
# 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() | ||
|