Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Merge pull request #29 from serpapi/support-proxy #282

Merge pull request #29 from serpapi/support-proxy

Merge pull request #29 from serpapi/support-proxy #282

Workflow file for this run

name: Build
on: [push]
jobs:
build:
name: "Deno tests and build npm files"
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Check formatting
run: deno fmt --check
- name: Run linter
run: deno lint
- name: Run tests
env:
SERPAPI_TEST_KEY: ${{ secrets.SERPAPI_TEST_KEY }}
run: deno task test
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22.x" # Build files using a fixed node version
registry-url: "https://registry.npmjs.org"
- name: Build npm files
run: deno task npm
- name: Zip build files
run: zip npm.zip ./npm -r
- name: Upload build files for smoke tests
uses: actions/upload-artifact@v4
with:
name: npm
path: npm.zip
retention-days: 1
smoke-tests-commonjs:
name: "Smoke tests (CommonJS)"
needs: build
runs-on: ubuntu-latest
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,
20.x,
21.x,
22.x,
23.x,
24.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@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"
- name: Download build files
uses: actions/download-artifact@v4
with:
name: npm
- name: Unzip build files
run: unzip npm.zip
- name: Run smoke tests
env:
SERPAPI_TEST_KEY: ${{ secrets.SERPAPI_TEST_KEY }}
run: |
cd smoke_tests/commonjs
npm i
npm run ${{ matrix.command }}
smoke-tests-esm:
name: "Smoke tests (ESM)"
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [
14.x,
15.x,
16.x,
17.x,
18.x,
19.x,
20.x,
21.x,
22.x,
23.x,
24.x,
]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"
- name: Download build files
uses: actions/download-artifact@v4
with:
name: npm
- name: Unzip build files
run: unzip npm.zip
- name: Run smoke tests
env:
SERPAPI_TEST_KEY: ${{ secrets.SERPAPI_TEST_KEY }}
run: |
cd smoke_tests/esm
npm i
npm test
Morty Proxy This is a proxified and sanitized view of the page, visit original site.