Skip to content

Commit

Permalink
Fix node version for test with Go 1.20
Browse files Browse the repository at this point in the history
Go 1.20's wasm_exec_node.js isn't compatible with Node v20
  • Loading branch information
at-wat committed Mar 4, 2024
1 parent bea7ddb commit 328bb71
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/test-wasm.reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- uses: actions/cache@v4
with:
path: |
Expand All @@ -42,6 +37,20 @@ jobs:
)
curl -sSfL https://dl.google.com/go/${version}.linux-amd64.tar.gz | tar -C ~ -xzf -
- name: Node version
id: node-version
run: |
if [ '${{ inputs.go-version }}' = '1.20' ]; then
# Go 1.20's wasm_exec_node.js doesn't work with Node v20
# This can be removed once all pion repositories are switched to use Go 1.22
echo 'version=16' | tee -a ${GITHUB_OUTPUT}
fi
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '${{ steps.node-version.outputs.version || 20 }}.x'

- name: Set Go Root
run: echo "GOROOT=${HOME}/go" >> $GITHUB_ENV

Expand Down

0 comments on commit 328bb71

Please sign in to comment.