Skip to content

Commit fa13f39

Browse files
authored
chore(ci): upgrade Node.js version from 16 to 20 in workflows (#4427)
* chore(ci): upgrade Node.js version from 16 to 20 in workflows * ci: upgrade Node.js to 20 and prevent template injection in test workflow * fix(ci): correct bash variable syntax and add quotes to workflow steps * chore(ci): upgrade Node.js version from 16 to 20 in workflows
1 parent e624251 commit fa13f39

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/test.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ jobs:
4242
access_token_lifetime: 600s
4343
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
4444
with:
45-
node-version: 16
45+
node-version: 20
4646
- name: Get npm cache directory
4747
id: npm-cache-dir
4848
shell: bash
4949
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
50-
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4
50+
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
5151
id: npm-cache
5252
with:
5353
path: ${{ steps.npm-cache-dir.outputs.dir }}
@@ -58,10 +58,14 @@ jobs:
5858
run: echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV
5959
- name: set testing env vars for scheduled run
6060
if: github.event.action == 'schedule'
61+
env:
62+
SUITE_NAME: ${{ inputs.name }}
6163
run: |
62-
echo "MOCHA_REPORTER_SUITENAME=${{ inputs.name }}" >> $GITHUB_ENV
64+
echo "MOCHA_REPORTER_SUITENAME=${SUITE_NAME}" >> $GITHUB_ENV
6365
echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV
6466
- name: Run Tests
65-
run: make test dir=${{ inputs.path }}
6667
env:
6768
GOOGLE_SAMPLES_PROJECT: "long-door-651"
69+
SAMPLE_PATH: ${{ inputs.path }}
70+
run: make test dir="${SAMPLE_PATH}"
71+

0 commit comments

Comments
 (0)