Skip to content

Commit 744a86c

Browse files
committed
Refine build workflow
1 parent cfd736f commit 744a86c

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ jobs:
7171
run: unzip npm.zip
7272

7373
- name: Run smoke tests
74+
env:
75+
SERPAPI_TEST_KEY: ${{ secrets.SERPAPI_TEST_KEY }}
7476
run: |
7577
cd tests/smoke/commonjs
7678
npm i
@@ -102,6 +104,8 @@ jobs:
102104
run: unzip npm.zip
103105

104106
- name: Run smoke tests
107+
env:
108+
SERPAPI_TEST_KEY: ${{ secrets.SERPAPI_TEST_KEY }}
105109
run: |
106110
cd tests/smoke/esm
107111
npm i

tests/smoke/commonjs/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
API_KEY=YOUR_API_KEY
1+
SERPAPI_TEST_KEY=YOUR_API_KEY

tests/smoke/commonjs/commonjs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const Dotenv = require("dotenv");
66
const { config, getJson, getHtml, getJsonBySearchId, getHtmlBySearchId, getAccount, getLocations } = require("serpapi");
77

88
Dotenv.config();
9-
const apiKey = process.env.API_KEY;
9+
const apiKey = process.env.SERPAPI_TEST_KEY;
1010

1111
const run = async () => {
1212
console.log("running", process.versions.node);

tests/smoke/esm/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
API_KEY=YOUR_API_KEY
1+
SERPAPI_TEST_KEY=YOUR_API_KEY

tests/smoke/esm/esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Dotenv from "dotenv";
66
import { config, getJson, getHtml, getJsonBySearchId, getHtmlBySearchId, getAccount, getLocations } from "serpapi";
77

88
Dotenv.config();
9-
const apiKey = process.env.API_KEY;
9+
const apiKey = process.env.SERPAPI_TEST_KEY;
1010

1111
console.log("running", process.versions.node);
1212

0 commit comments

Comments
 (0)