diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3280d98..632ead8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ name: Build -on: [push, pull_request] +on: [push] jobs: build: @@ -52,6 +52,15 @@ jobs: strategy: matrix: node-version: [7.x, 8.x, 9.x, 10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x] + include: + - command: test + - command: test:use-openssl-ca + node-version: 7.x + - command: test:use-openssl-ca + node-version: 8.x + - command: test:use-openssl-ca + node-version: 9.x + steps: - name: Checkout repo uses: actions/checkout@v3 @@ -73,14 +82,10 @@ jobs: - name: Run smoke tests env: SERPAPI_TEST_KEY: ${{ secrets.SERPAPI_TEST_KEY }} - NODE_OPTIONS: --use-openssl-ca run: | cd smoke_tests/commonjs - if [ "$(node -v)" == "v7.10.1" ]; then - sed -i.orig -e 's/node commonjs.js/node --use-openssl-ca commonjs.js/' package.json - fi npm i - npm test + npm ${{ matrix.command }} smoke-tests-esm: name: "Smoke tests (ESM)" diff --git a/smoke_tests/commonjs/package.json b/smoke_tests/commonjs/package.json index f229cf1..d1971c6 100644 --- a/smoke_tests/commonjs/package.json +++ b/smoke_tests/commonjs/package.json @@ -4,6 +4,7 @@ "serpapi": "../../npm" }, "scripts": { - "test": "node commonjs.js" + "test": "node commonjs.js", + "test:use-openssl-ca": "node --use-openssl-ca commonjs.js" } } diff --git a/smoke_tests/esm/package.json b/smoke_tests/esm/package.json index aaae393..7d89721 100644 --- a/smoke_tests/esm/package.json +++ b/smoke_tests/esm/package.json @@ -5,6 +5,6 @@ "serpapi": "../../npm" }, "scripts": { - "test": "node esm.js" + "test": "node --use-openssl-ca esm.js" } }