Skip to content

Commit

Permalink
Attempt continued
Browse files Browse the repository at this point in the history
  • Loading branch information
zyc9012 committed Mar 12, 2024
1 parent 7d2266f commit 22ff7db
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build

on: [push, pull_request]
on: [push]

jobs:
build:
Expand Down Expand Up @@ -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
Expand All @@ -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 run ${{ matrix.command }}
smoke-tests-esm:
name: "Smoke tests (ESM)"
Expand Down
3 changes: 2 additions & 1 deletion smoke_tests/commonjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion smoke_tests/esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"serpapi": "../../npm"
},
"scripts": {
"test": "node esm.js"
"test": "node --use-openssl-ca esm.js"
}
}

0 comments on commit 22ff7db

Please sign in to comment.