Skip to content

Commit 0d85cad

Browse files
authored
Merge pull request #3761 from plotly/fix/html-percy-cmd
fix percy action working directory
2 parents 96969d1 + e9f175a commit 0d85cad

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.github/actions/percy-exec/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,26 @@ inputs:
99
description: 'Percy token (pass secrets.PERCY_TOKEN)'
1010
required: false
1111
default: ''
12+
working-directory:
13+
description: 'Working directory for the command'
14+
required: false
15+
default: '.'
1216

1317
runs:
1418
using: 'composite'
1519
steps:
1620
- name: Run with Percy
1721
if: inputs.percy-token != ''
1822
shell: bash
23+
working-directory: ${{ inputs.working-directory }}
1924
env:
2025
PERCY_TOKEN: ${{ inputs.percy-token }}
2126
run: npx percy exec -- ${{ inputs.command }}
2227

2328
- name: Run without Percy (fork PR)
2429
if: inputs.percy-token == ''
2530
shell: bash
31+
working-directory: ${{ inputs.working-directory }}
2632
run: |
2733
echo "::notice::Skipping Percy (no token available - likely a fork PR)"
2834
${{ inputs.command }}

.github/workflows/testing.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,9 @@ jobs:
617617
if: matrix.python-version == '3.12'
618618
uses: ./.github/actions/percy-exec
619619
with:
620-
command: cd components/dash-html-components && pytest --headless --nopercyfinalize --junitxml=test-reports/junit_html.xml
620+
command: pytest --headless --nopercyfinalize --junitxml=test-reports/junit_html.xml
621621
percy-token: ${{ secrets.PERCY_TOKEN }}
622+
working-directory: components/dash-html-components
622623

623624
- name: Upload test results
624625
if: always()

0 commit comments

Comments
 (0)