Skip to content

Commit 7d2266f

Browse files
committed
Attempt to fix CI for earlier node versions.
Node hardcodes its default TLS certificates, meaning older versions do not support the root certificate currently used by LetsEncrypt. Use --use-openssl-ca to enable the use of the system's OpenSSL certificates. Since node v7 doesn't support NODE_OPTIONS, conditionally modify the test script with sed.
1 parent 7610f9f commit 7d2266f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/build.yml

+4
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,12 @@ jobs:
7373
- name: Run smoke tests
7474
env:
7575
SERPAPI_TEST_KEY: ${{ secrets.SERPAPI_TEST_KEY }}
76+
NODE_OPTIONS: --use-openssl-ca
7677
run: |
7778
cd smoke_tests/commonjs
79+
if [ "$(node -v)" == "v7.10.1" ]; then
80+
sed -i.orig -e 's/node commonjs.js/node --use-openssl-ca commonjs.js/' package.json
81+
fi
7882
npm i
7983
npm test
8084

0 commit comments

Comments
 (0)