-
-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #400 from tiagosiebler/pubtype
v2.9.5: feat() use github action for test, feat() publish with provenance, fix(#398) bestBid/bestAskPrice property in 24hr ticker formatted type
- Loading branch information
Showing
11 changed files
with
83 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: 'Build & Test' | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
name: 'Build & Test' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 'Checkout source code' | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
registry-url: 'https://registry.npmjs.org/' | ||
cache: 'npm' | ||
|
||
- name: Install | ||
run: npm ci --ignore-scripts | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Test | ||
run: npm run test | ||
env: | ||
API_KEY_COM: ${{ secrets.API_KEY_COM }} | ||
API_SECRET_COM: ${{ secrets.API_SECRET_COM }} | ||
PROXY_ENABLED: ${{ secrets.PROXY_ENABLED }} | ||
PROXY_HOST: ${{ secrets.PROXY_HOST }} | ||
PROXY_PORT: ${{ secrets.PROXY_PORT }} | ||
PROXY_USER: ${{ secrets.PROXY_USER }} | ||
PROXY_PASS: ${{ secrets.PROXY_PASS }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,26 @@ | ||
import { getHttpsProxyAgent } from '../src'; | ||
import { AxiosRequestConfig } from 'axios'; | ||
|
||
export function getTestProxy() { | ||
export function getTestProxy(): AxiosRequestConfig { | ||
if (process.env.PROXY_ENABLED !== 'true') { | ||
return; | ||
return {}; | ||
} | ||
const host = process.env.PROXY_HOST; | ||
const port = process.env.PROXY_PORT; | ||
const user = process.env.PROXY_USER; | ||
const pass = process.env.PROXY_PASS; | ||
if (!host || !port || !user || !pass) { | ||
throw new Error(`One or more env vars missing for proxy support`); | ||
throw new Error('One or more env vars missing for proxy support'); | ||
} | ||
|
||
const httpsAgent = getHttpsProxyAgent(host, port, user, pass); | ||
return httpsAgent; | ||
return { | ||
proxy: { | ||
host, | ||
port: Number(port), | ||
auth: { | ||
username: user, | ||
password: pass, | ||
}, | ||
protocol: 'http', | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters