Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/auto-assign-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ addReviewers: true
addAssignees: author

reviewers:
- Shreyas-vgr
- doiron
- tkm22
- CamdenFoucht
- tydonelson
- LucioMS
4 changes: 2 additions & 2 deletions .github/workflows/functional-test-clean-up.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '16.x'
- run: npm install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '16.x'
- run: git config --global user.email "ask-cli-test@amazon.com"
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,19 @@ on:

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [16]
node: [16, 18]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Set up Python 3.x
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: npm install
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Unit Test

on:
push:
branches:
branches:
- master
- develop
paths-ignore:
Expand All @@ -13,13 +13,11 @@ on:

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [14, 16]

node: [16, 18]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }}
Expand Down
96 changes: 29 additions & 67 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"test:report": "nyc npm run test",
"test:browser": "npm run test:report && open coverage/index.html",
"pre-test": "npm run build && chmod +x ./dist/bin/ask.js",
"integration-test": "npm run pre-test && mocha -t 180000 test/integration/run-test.js",
"integration-test": "npm run pre-test && mocha --parallel -t 180000 test/integration/run-test.js",
"functional-test": "npm run pre-test && mocha -t 600000 -u bdd --require ts-node/register test/functional/run-test.js -R spec 'test/functional/{,**/}!(*.d).{ts,js}'",
"functional-test:clean-up": "node scripts/aws-clean-up.js; node scripts/ask-clean-up.js",
"format": "prettier --write .",
Expand Down Expand Up @@ -96,6 +96,7 @@
"@types/fs-extra": "^9.0.13",
"@types/inquirer": "^8.2.1",
"@types/jsonfile": "^6.1.0",
"@types/listr": "0.14.4",
"@types/mocha": "^9.1.1",
"@types/portscanner": "^2.1.1",
"@types/proxyquire": "^1.3.28",
Expand All @@ -105,15 +106,14 @@
"@types/sinon-chai": "^3.2.8",
"@types/uuid": "^8.3.4",
"@types/vscode": "^1.34.0",
"@types/listr": "0.14.4",
"@vscode/test-electron": "^1.6.1",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"chai-json-schema": "^1.5.1",
"chai-uuid": "^1.0.6",
"copyfiles": "^2.4.1",
"husky": "^7.0.4",
"mocha": "^9.2.2",
"mocha": "^10.2.0",
"mocha-chai-jest-snapshot": "^1.1.3",
"mocha.parallel": "^0.15.6",
"npm-bundle": "3.0.3",
Expand Down
14 changes: 8 additions & 6 deletions test/integration/commands/smapi-commands-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { expect } = require("chai");
const { ModelIntrospector } = require("ask-smapi-sdk");
const parallel = require("mocha.parallel");
const path = require("path");

const { CliCustomizationProcessor } = require("../../../lib/commands/smapi/cli-customization-processor");
Expand All @@ -13,9 +12,7 @@ const interactionModel = require("../../integration/fixtures/interaction-model.j
const annotationSet = require("../../integration/fixtures/annotation-set.json");
const jobDefinition = require("../../integration/fixtures/job-definition.json");
const experimentMetricConfigurationModel = require('../../integration/fixtures/experiment-metric-configuration.json');

parallel.limit(8);

const { after, before } = require("mocha");
const processor = new CliCustomizationProcessor();
const modelIntrospector = new ModelIntrospector();
const untestedCommands = new Set([...modelIntrospector.getOperations().keys()].map(processor.processOperationName));
Expand All @@ -30,7 +27,7 @@ const addCoveredCommand = (args) => {
untestedCommands.delete(smapiCmd);
};

parallel('smapi command test', () => {
describe('smapi command test', () => {
const askCmd = path.join(process.cwd(), "/dist/bin/ask.js");
const subCmd = 'smapi';
let mockSmapiServer;
Expand Down Expand Up @@ -690,6 +687,7 @@ parallel('smapi command test', () => {
});

it("| should get interaction model catalog update status", async () => {
console.log("here");
const args = [subCmd, "get-interaction-model-catalog-update-status", "-c", catalogId, "--update-request-id", updateRequestId];
addCoveredCommand(args);
const result = await run(askCmd, args, options);
Expand Down Expand Up @@ -1510,8 +1508,12 @@ parallel('smapi command test', () => {
});

after(() => {
console.log("killing smapi server mock");
mockSmapiServer.kill();
console.log("killing lwa server mock");
mockLwaServer.kill();
console.log("checking expects");
expect(Array.from(untestedCommands), 'should not have untested commands').eql([]);
console.log("all done");
});
});
});