Skip to content

Commit

Permalink
SWI-5429 Update Test Suite and Workflows (#30)
Browse files Browse the repository at this point in the history
* SWI-5429 Update Test Suite and Workflows

* update template

* remove matrix from smoke tests
  • Loading branch information
ckoegel authored Jun 11, 2024
1 parent a3a437a commit 40b5980
Show file tree
Hide file tree
Showing 61 changed files with 98 additions and 99 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:

- name: Install Packages and Test
run: |
npm i
npm test
yarn
yarn test-unit
- name: Publish npm Package
run: |
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/test-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Main Branch Nightly
name: Nightly Smoke Tests

on:
schedule:
Expand Down Expand Up @@ -26,13 +26,8 @@ env:

jobs:
test_main:
name: Test Main Branch Nightly
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, windows-2019, ubuntu-20.04, ubuntu-22.04]
node-version: [16, 18, 20, 22]
fail-fast: false
name: Nightly Smoke Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -42,14 +37,14 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 20

- name: Install Packages and Test
run: |
yarn
yarn test
yarn test-smoke
env:
OPERATING_SYSTEM: ${{ matrix.os }}
OPERATING_SYSTEM: "ubuntu"

notify_for_failures:
name: Notify for Failures
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ jobs:
- name: Install Packages and Test
run: |
yarn
yarn test
yarn test-unit
env:
OPERATING_SYSTEM: ${{ matrix.os }}
2 changes: 2 additions & 0 deletions custom_templates/package.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"scripts": {
"build": "tsc {{#supportsES6}}&& tsc -p tsconfig.esm.json{{/supportsES6}}",
"prepare": "npm run build",
"test-unit": "jest --coverage --detectOpenHandles --testPathPattern=tests/unit",
"test-smoke": "jest --coverage --detectOpenHandles --testPathPattern=tests/smoke",
"test": "jest --coverage --detectOpenHandles"
},
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"scripts": {
"build": "tsc ",
"prepare": "npm run build",
"test-unit": "jest --coverage --detectOpenHandles --testPathPattern=tests/unit",
"test-smoke": "jest --coverage --detectOpenHandles --testPathPattern=tests/smoke",
"test": "jest --coverage --detectOpenHandles"
},
"dependencies": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Bxml } from '../../../models/bxml/Bxml';
import { PauseRecording } from '../../../models/bxml/verbs/PauseRecording';
import { Root } from '../../../models/bxml/Root';
import { Bxml } from '../../../../models/bxml/Bxml';
import { PauseRecording } from '../../../../models/bxml/verbs/PauseRecording';
import { Root } from '../../../../models/bxml/Root';

describe('Bxml', () => {
const pauseRecording = new PauseRecording();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../models/bxml/Verb';
import { NestableVerb } from '../../../models/bxml/NestableVerb';
import { Verb } from '../../../../models/bxml/Verb';
import { NestableVerb } from '../../../../models/bxml/NestableVerb';

describe('NestableVerb', () => {
test('should create a nestable verb', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Response } from '../../../models/bxml/Response';
import { PauseRecording } from '../../../models/bxml/verbs/PauseRecording';
import { Root } from '../../../models/bxml/Root';
import { Response } from '../../../../models/bxml/Response';
import { PauseRecording } from '../../../../models/bxml/verbs/PauseRecording';
import { Root } from '../../../../models/bxml/Root';

describe('Response', () => {
const pauseRecording = new PauseRecording();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Verb } from '../../../models/bxml/Verb';
import { Verb } from '../../../../models/bxml/Verb';

describe('Verb', () => {
test('should create a verb', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { Bridge, BridgeAttributes } from '../../../../models/bxml/verbs/Bridge';
import { Verb } from '../../../../../models/bxml/Verb';
import { Bridge, BridgeAttributes } from '../../../../../models/bxml/verbs/Bridge';

describe('Bridge', () => {
const attributes: BridgeAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { Conference, ConferenceAttributes } from '../../../../models/bxml/verbs/Conference';
import { Verb } from '../../../../../models/bxml/Verb';
import { Conference, ConferenceAttributes } from '../../../../../models/bxml/verbs/Conference';

describe('Conference', () => {
const attributes: ConferenceAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { CustomParam, CustomParamAttributes } from '../../../../models/bxml/verbs/CustomParam';
import { Verb } from '../../../../../models/bxml/Verb';
import { CustomParam, CustomParamAttributes } from '../../../../../models/bxml/verbs/CustomParam';

describe('CustomParam', () => {
const attributes: CustomParamAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { Forward, ForwardAttributes} from '../../../../models/bxml/verbs/Forward';
import { Verb } from '../../../../../models/bxml/Verb';
import { Forward, ForwardAttributes} from '../../../../../models/bxml/verbs/Forward';

describe('Forward', () => {
const attributes: ForwardAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Verb } from '../../../../models/bxml/Verb';
import { Gather, GatherAttributes } from '../../../../models/bxml/verbs/Gather';
import { PlayAudio } from '../../../../models/bxml/verbs/PlayAudio';
import { SpeakSentence } from '../../../../models/bxml/verbs/SpeakSentence';
import { Verb } from '../../../../../models/bxml/Verb';
import { Gather, GatherAttributes } from '../../../../../models/bxml/verbs/Gather';
import { PlayAudio } from '../../../../../models/bxml/verbs/PlayAudio';
import { SpeakSentence } from '../../../../../models/bxml/verbs/SpeakSentence';

describe('Gather', () => {
const attributes: GatherAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { Hangup } from '../../../../models/bxml/verbs/Hangup';
import { Verb } from '../../../../../models/bxml/Verb';
import { Hangup } from '../../../../../models/bxml/verbs/Hangup';

describe('Hangup', () => {
const expected = '<Hangup/>';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { Pause, PauseAttributes } from '../../../../models/bxml/verbs/Pause';
import { Verb } from '../../../../../models/bxml/Verb';
import { Pause, PauseAttributes } from '../../../../../models/bxml/verbs/Pause';

describe('Pause', () => {
const attributes: PauseAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { PauseRecording } from '../../../../models/bxml/verbs/PauseRecording';
import { Verb } from '../../../../../models/bxml/Verb';
import { PauseRecording } from '../../../../../models/bxml/verbs/PauseRecording';

describe('PauseRecording', () => {
const expected = '<PauseRecording/>';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { PhoneNumber, PhoneNumberAttributes } from '../../../../models/bxml/verbs/PhoneNumber';
import { Verb } from '../../../../../models/bxml/Verb';
import { PhoneNumber, PhoneNumberAttributes } from '../../../../../models/bxml/verbs/PhoneNumber';

describe('PhoneNumber', () => {
const attributes: PhoneNumberAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { PlayAudio, PlayAudioAttributes } from '../../../../models/bxml/verbs/PlayAudio';
import { Verb } from '../../../../../models/bxml/Verb';
import { PlayAudio, PlayAudioAttributes } from '../../../../../models/bxml/verbs/PlayAudio';

describe('PlayAudio', () => {
const attributes: PlayAudioAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { Record, RecordAttributes } from '../../../../models/bxml/verbs/Record';
import { Verb } from '../../../../../models/bxml/Verb';
import { Record, RecordAttributes } from '../../../../../models/bxml/verbs/Record';

describe('Record', () => {
const attributes: RecordAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { Redirect, RedirectAttributes } from '../../../../models/bxml/verbs/Redirect';
import { Verb } from '../../../../../models/bxml/Verb';
import { Redirect, RedirectAttributes } from '../../../../../models/bxml/verbs/Redirect';

describe('Redirect', () => {
const attributes: RedirectAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { ResumeRecording } from '../../../../models/bxml/verbs/ResumeRecording';
import { Verb } from '../../../../../models/bxml/Verb';
import { ResumeRecording } from '../../../../../models/bxml/verbs/ResumeRecording';

describe('ResumeRecording', () => {
const expected = '<ResumeRecording/>';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { Ring, RingAttributes } from '../../../../models/bxml/verbs/Ring';
import { Verb } from '../../../../../models/bxml/Verb';
import { Ring, RingAttributes } from '../../../../../models/bxml/verbs/Ring';

describe('Ring', () => {
const attributes: RingAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { SendDtmf, SendDtmfAttributes } from '../../../../models/bxml/verbs/SendDtmf';
import { Verb } from '../../../../../models/bxml/Verb';
import { SendDtmf, SendDtmfAttributes } from '../../../../../models/bxml/verbs/SendDtmf';

describe('SendDtmf', () => {
const attributes: SendDtmfAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { SipUri, SipUriAttributes } from '../../../../models/bxml/verbs/SipUri';
import { Verb } from '../../../../../models/bxml/Verb';
import { SipUri, SipUriAttributes } from '../../../../../models/bxml/verbs/SipUri';

describe('SipUri', () => {
const attributes: SipUriAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { SpeakSentence, SpeakSentenceAttributes } from '../../../../models/bxml/verbs/SpeakSentence';
import { Verb } from '../../../../../models/bxml/Verb';
import { SpeakSentence, SpeakSentenceAttributes } from '../../../../../models/bxml/verbs/SpeakSentence';

describe('SpeakSentence', () => {
const attributes: SpeakSentenceAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { StartGather, StartGatherAttributes } from '../../../../models/bxml/verbs/StartGather';
import { Verb } from '../../../../../models/bxml/Verb';
import { StartGather, StartGatherAttributes } from '../../../../../models/bxml/verbs/StartGather';

describe('CustomParam', () => {
const attributes: StartGatherAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { StartRecording, StartRecordingAttributes } from '../../../../models/bxml/verbs/StartRecording';
import { Verb } from '../../../../../models/bxml/Verb';
import { StartRecording, StartRecordingAttributes } from '../../../../../models/bxml/verbs/StartRecording';

describe('StartRecording', () => {
const attributes: StartRecordingAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Verb } from '../../../../models/bxml/Verb';
import { StartStream, StartStreamAttributes } from '../../../../models/bxml/verbs/StartStream';
import { StreamParam } from '../../../../models/bxml/verbs/StreamParam';
import { Verb } from '../../../../../models/bxml/Verb';
import { StartStream, StartStreamAttributes } from '../../../../../models/bxml/verbs/StartStream';
import { StreamParam } from '../../../../../models/bxml/verbs/StreamParam';

describe('StartStream', () => {
const attributes: StartStreamAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Verb } from '../../../../models/bxml/Verb';
import { StartTranscription, StartTranscriptionAttributes } from '../../../../models/bxml/verbs/StartTranscription';
import { CustomParam } from '../../../../models/bxml/verbs/CustomParam';
import { Verb } from '../../../../../models/bxml/Verb';
import { StartTranscription, StartTranscriptionAttributes } from '../../../../../models/bxml/verbs/StartTranscription';
import { CustomParam } from '../../../../../models/bxml/verbs/CustomParam';

describe('StartTranscription', () => {
const attributes: StartTranscriptionAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { StopGather } from '../../../../models/bxml/verbs/StopGather';
import { Verb } from '../../../../../models/bxml/Verb';
import { StopGather } from '../../../../../models/bxml/verbs/StopGather';

describe('StopGather', () => {
const expected = '<StopGather/>';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { StopRecording } from '../../../../models/bxml/verbs/StopRecording';
import { Verb } from '../../../../../models/bxml/Verb';
import { StopRecording } from '../../../../../models/bxml/verbs/StopRecording';

describe('StopRecording', () => {
const expected = '<StopRecording/>';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { StopStream, StopStreamAttributes } from '../../../../models/bxml/verbs/StopStream';
import { Verb } from '../../../../../models/bxml/Verb';
import { StopStream, StopStreamAttributes } from '../../../../../models/bxml/verbs/StopStream';

describe('StopStream', () => {
const attributes: StopStreamAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { StopTranscription, StopTranscriptionAttributes } from '../../../../models/bxml/verbs/StopTranscription';
import { Verb } from '../../../../../models/bxml/Verb';
import { StopTranscription, StopTranscriptionAttributes } from '../../../../../models/bxml/verbs/StopTranscription';

describe('StopTranscription', () => {
const attributes: StopTranscriptionAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { StreamParam, StreamParamAttributes } from '../../../../models/bxml/verbs/StreamParam';
import { Verb } from '../../../../../models/bxml/Verb';
import { StreamParam, StreamParamAttributes } from '../../../../../models/bxml/verbs/StreamParam';

describe('StreamParam', () => {
const attributes: StreamParamAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verb } from '../../../../models/bxml/Verb';
import { Tag } from '../../../../models/bxml/verbs/Tag';
import { Verb } from '../../../../../models/bxml/Verb';
import { Tag } from '../../../../../models/bxml/verbs/Tag';

describe('Tag', () => {
const expected = '<Tag>testTag</Tag>';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Verb } from '../../../../models/bxml/Verb';
import { PhoneNumber } from '../../../../models/bxml/verbs/PhoneNumber';
import { SipUri } from '../../../../models/bxml/verbs/SipUri';
import { Transfer, TransferAttributes } from '../../../../models/bxml/verbs/Transfer';
import { Verb } from '../../../../../models/bxml/Verb';
import { PhoneNumber } from '../../../../../models/bxml/verbs/PhoneNumber';
import { SipUri } from '../../../../../models/bxml/verbs/SipUri';
import { Transfer, TransferAttributes } from '../../../../../models/bxml/verbs/Transfer';

describe('Transfer', () => {
const attributes: TransferAttributes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CallDirectionEnum } from '../../models/call-direction-enum';
import { CallDirectionEnum } from '../../../models/call-direction-enum';

describe('CallDirectionEnum', () => {
test('should define the expected values', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CallStateEnum } from '../../models/call-state-enum';
import { CallStateEnum } from '../../../models/call-state-enum';

describe('CallStateEnum', () => {
test('should define the expected values', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CallbackMethodEnum } from '../../models/callback-method-enum';
import { CallbackMethodEnum } from '../../../models/callback-method-enum';

describe('CallbackMethodEnum', () => {
test('should define the expected values', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConferenceStateEnum } from '../../models/conference-state-enum';
import { ConferenceStateEnum } from '../../../models/conference-state-enum';

describe('ConferenceStateEnum', () => {
test('should define the expected values', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FileFormatEnum } from '../../models/file-format-enum';
import { FileFormatEnum } from '../../../models/file-format-enum';

describe('FileFormatEnum', () => {
test('should define the expected values', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ListMessageDirectionEnum } from '../../models/list-message-direction-enum';
import { ListMessageDirectionEnum } from '../../../models/list-message-direction-enum';

describe('ListMessageDirectionEnum', () => {
test('should define the expected values', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LookupStatusEnum } from '../../models/lookup-status-enum';
import { LookupStatusEnum } from '../../../models/lookup-status-enum';

describe('LookupStatusEnum', () => {
test('should define the expected values', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MachineDetectionModeEnum } from '../../models/machine-detection-mode-enum';
import { MachineDetectionModeEnum } from '../../../models/machine-detection-mode-enum';

describe('MachineDetectionModeEnum', () => {
test('should define the expected values', () => {
Expand Down
Loading

0 comments on commit 40b5980

Please sign in to comment.