Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(vrt-poc): properly process script json output #34045

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .github/workflows/pr-vrt-poc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,22 @@ jobs:
echo $PR_DETAILS
env:
W_RUN: ${{ toJSON(github.event) }}
PR_DETAILS: ${{steps.pr_details.outputs.result}}
PR_DETAILS: ${{fromJson(steps.pr_details.outputs.result)}}

- name: Checkout Forked Repository
uses: actions/checkout@v4
with:
ref: ${{ steps.pr_details.outputs.result.head.ref }}
repository: ${{ steps.pr_details.outputs.result.repo.full_name }}
fetch-depth: 0
ref: ${{ fromJson(steps.pr_details.outputs.result).head.ref }}
repository: ${{ fromJson(steps.pr_details.outputs.result).head.repo.full_name }}
fetch-depth: 10

- name: Debug2
run: |
echo "--base ${{ steps.pr_details.outputs.result.base.sha }} --head ${{ steps.pr_details.outputs.result.head.sha }}"
echo "--base ${{ fromJson(steps.pr_details.outputs.result).base.sha }} --head ${{ fromJson(steps.pr_details.outputs.result).head.sha }}"
echo "===="
git status
echo '===='
ls -la packages/react-components/react-text/visual-regression
env:
W_RUN: ${{ toJSON(github.event) }}
PR_DETAILS: ${{steps.pr_details.outputs.result}}

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@dbe0650947e5f2c81f59190a38512cf49126fe6b # v4.3.0
Expand All @@ -82,7 +79,7 @@ jobs:

- name: Update VR tests diff
id: update_diff
run: yarn nx affected -t test-vr-cli -u --nxBail --base ${{ steps.pr_details.outputs.result.base.sha }} --head ${{ steps.pr_details.outputs.result.head.sha }}
run: yarn nx affected -t test-vr-cli -u --nxBail --base ${{ fromJson(steps.pr_details.outputs.result).base.sha }} --head ${{ fromJson(steps.pr_details.outputs.result).head.sha }}

- name: Configure Git
run: |
Expand All @@ -95,7 +92,7 @@ jobs:
git add *.png
if [[ -n $(git status --porcelain) ]]; then
git commit -m "chore: update vrt baseline / triggered by PR comment"
git push origin ${{ github.event.pull_request.head.ref }}
git push origin ${{ fromJson(steps.pr_details.outputs.result).head.ref }}
echo "name=changes=true" >> $GITHUB_OUTPUT
else
echo "No Visual Regression image changes to commit."
Expand Down