Skip to content

Commit

Permalink
build: updating workflow to with max-workers set for jest
Browse files Browse the repository at this point in the history
  • Loading branch information
manchuck committed May 17, 2023
1 parent fff69dd commit 15bfc32
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install typescript
run: npm install -g typescript npm${{ matrix.npm_version }} && npm install

- name: Lint, Compile, Test
run: npm run compile && npm run test -- --coverage --verbose
run: npm run compile && npm run test -- --coverage --verbose --maxWorkers=2

- name: Run codecov
uses: codecov/codecov-action@v3
Expand Down
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions packages/messages/lib/messages.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import { Client, AuthenticationType } from '@vonage/server-client';
import { VetchOptions } from '@vonage/vetch';
import { MessageSuccess } from './interfaces';
import { SendMessageParams, MessageSuccessResponse } from './types';
import debug from 'debug';

const log = debug('vonage:messages');

type VonageRequest = {
data: { [key: string]: unknown }
headers: { Authorization: string }
}

export class Messages extends Client {
/**
* Handle various ways the Messages API handles auth
Expand All @@ -19,8 +15,8 @@ export class Messages extends Client {
* @param {any} request - Object containing request data
*/
public async addAuthenticationToRequest(
request: VonageRequest,
): Promise<VonageRequest & unknown> {
request: VetchOptions,
): Promise<VetchOptions & unknown> {
log('Auth config', this.auth);
this.authType = AuthenticationType.KEY_SECRET;

Expand All @@ -31,7 +27,7 @@ export class Messages extends Client {

if (this.auth.signature) {
log('Signing the request');
this.authType = AuthenticationType.signature;
this.authType = AuthenticationType.SIGNATURE;
}

return super.addAuthenticationToRequest(request);
Expand Down
1 change: 1 addition & 0 deletions packages/messages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"dependencies": {
"@vonage/auth": "^1.3.0",
"@vonage/server-client": "^1.4.0",
"@vonage/vetch": "^1.3.0",
"debug": "^4.3.4"
},
"devDependencies": {
Expand Down

0 comments on commit 15bfc32

Please sign in to comment.