Skip to content

Commit 8a190ec

Browse files
authored
fix: Fixes bad variable name (#655)
* fix: Fixes bad variable name This workflow had been looking for a variable called `affected_workspaces`, but the find-changes.sh script outputs a variable named `changed_workspaces`. This changes the playwright.yml workflow to use the CORRECT variable name. * fix: Changes wording for consistency Changes wording from "affected" to "changed" because somebody has raging OCD. That somebody is me.
1 parent 490f22c commit 8a190ec

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

.github/workflows/playwright.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,13 @@ jobs:
5050
fetch-depth: 0
5151
lfs: true
5252

53-
- name: Get Affected Workspaces
53+
- name: Get Changed Workspaces
5454
id: get_workspaces
5555
# For PRs, compare against the origin's version of the base branch.
5656
# For pushes, compare against the commit before the push.
5757
run: |
5858
bash samples/find-changes.sh ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event.before }}
5959
60-
- name: Debug Affected Workspaces
61-
run: |
62-
echo "Let's verify that we got the varname wrong (should be changed_workspaces)"
63-
echo "Affected workspaces (worng): ${{ steps.get_workspaces.outputs.affected_workspaces }}"
64-
echo "Changed workspaces (ding ding ding): ${{ steps.get_workspaces.outputs.changed_workspaces }}"
65-
6660
- name: Setup Node.js
6761
uses: actions/setup-node@v4
6862
with:
@@ -93,14 +87,14 @@ jobs:
9387
- name: Install Playwright Browsers
9488
run: npx playwright install --with-deps
9589

96-
- name: Build Affected Projects
90+
- name: Build Changed Workspaces
9791
run: |
9892
IFS=$'\n'
99-
AFFECTED_WORKSPACES_ARRAY=(${{ steps.get_workspaces.outputs.affected_workspaces }})
100-
echo "Affected Workspaces Array: ${AFFECTED_WORKSPACES_ARRAY[@]}"
93+
CHANGED_WORKSPACES_ARRAY=(${{ steps.get_workspaces.outputs.changed_workspaces }})
94+
echo "Changed Workspaces Array: ${CHANGED_WORKSPACES_ARRAY[@]}"
10195
102-
echo "Building affected workspaces:"
103-
for workspace in "${AFFECTED_WORKSPACES_ARRAY[@]}"; do
96+
echo "Building changed workspaces:"
97+
for workspace in "${CHANGED_WORKSPACES_ARRAY[@]}"; do
10498
echo " - samples/$workspace"
10599
npm run build --workspace=samples/$workspace
106100
done
@@ -109,16 +103,11 @@ jobs:
109103
run: bash samples/generate-index.sh
110104
# Consider adding an 'if' condition if it only needs to run when 'samples/' changed at all.
111105
# if: |
112-
# steps.get_workspaces.outputs.affected_workspaces != '' || # If any workspace built
106+
# steps.get_workspaces.outputs.changed_workspaces != '' || # If any workspace built
113107
# contains(github.event.pull_request.paths.*, 'samples/generate-index.sh') # Or if the script itself changed
114108

115-
- name: Debug Affected Workspaces Output
116-
run: |
117-
echo "Affected workspaces: ${{ steps.get_workspaces.outputs.affected_workspaces }}"
118-
echo "Affected workspaces (length): ${{ steps.get_workspaces.outputs.affected_workspaces.length }}"
119-
120109
- name: Run All Playwright Tests
121-
if: steps.get_workspaces.outputs.affected_workspaces != ''
110+
if: steps.get_workspaces.outputs.changed_workspaces != ''
122111
run: npx playwright test e2e/samples.spec.ts
123112
env:
124113
# Pass the correct base reference for find-changes.sh when called by samples.spec.ts

0 commit comments

Comments
 (0)