diff --git a/.github/auto-assign-config.yml b/.github/auto-assign-config.yml index a6f9e810..52f6c024 100644 --- a/.github/auto-assign-config.yml +++ b/.github/auto-assign-config.yml @@ -3,7 +3,6 @@ addReviewers: true addAssignees: author reviewers: - - Shreyas-vgr - doiron - - tkm22 - - CamdenFoucht + - tydonelson + - LucioMS diff --git a/.github/workflows/functional-test-clean-up.yml b/.github/workflows/functional-test-clean-up.yml index 9bde89b5..cc5a9729 100644 --- a/.github/workflows/functional-test-clean-up.yml +++ b/.github/workflows/functional-test-clean-up.yml @@ -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 diff --git a/.github/workflows/functional-test.yml b/.github/workflows/functional-test.yml index fdb61185..b8a22dfb 100644 --- a/.github/workflows/functional-test.yml +++ b/.github/workflows/functional-test.yml @@ -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" diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 77df3142..e55be7e3 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -13,12 +13,11 @@ 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 }} @@ -26,7 +25,7 @@ jobs: 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 diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index ae0f1cdb..286f473f 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -2,7 +2,7 @@ name: Unit Test on: push: - branches: + branches: - master - develop paths-ignore: @@ -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 }} diff --git a/package-lock.json b/package-lock.json index d73b58ac..54f09650 100644 --- a/package-lock.json +++ b/package-lock.json @@ -76,7 +76,7 @@ "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", @@ -2224,12 +2224,6 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "node_modules/@vscode/test-electron": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-1.6.2.tgz", @@ -5883,15 +5877,6 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "engines": { - "node": ">=4.x" - } - }, "node_modules/handlebars": { "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", @@ -7192,12 +7177,6 @@ "bluebird": "*" } }, - "node_modules/json-promise/node_modules/bluebird": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.2.2.tgz", - "integrity": "sha512-NqzuS2y44FmP++Ihv6/PgXpNRB+c282TKq0URBTQdA+EqPpR1Qu44QY8H8667LA39iOIaVHpmRPI4gpthYT8Ug==", - "dev": true - }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -8674,42 +8653,39 @@ } }, "node_modules/mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, "dependencies": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", - "debug": "4.3.3", + "debug": "4.3.4", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", "glob": "7.2.0", - "growl": "1.10.5", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", - "minimatch": "4.2.1", + "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.1", + "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", + "workerpool": "6.2.1", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" }, "bin": { "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "mocha": "bin/mocha.js" }, "engines": { - "node": ">= 12.0.0" + "node": ">= 14.0.0" }, "funding": { "type": "opencollective", @@ -8780,29 +8756,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/mocha/node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/mocha/node_modules/diff": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", @@ -8888,17 +8841,26 @@ } }, "node_modules/mocha/node_modules/minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { "node": ">=10" } }, + "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/mocha/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -9040,9 +9002,9 @@ "optional": true }, "node_modules/nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true, "bin": { "nanoid": "bin/nanoid.cjs" @@ -13147,9 +13109,9 @@ "dev": true }, "node_modules/workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, "node_modules/wrap-ansi": { diff --git a/package.json b/package.json index 6f5f683c..e5ac1878 100644 --- a/package.json +++ b/package.json @@ -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 .", @@ -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", @@ -105,7 +106,6 @@ "@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", @@ -113,7 +113,7 @@ "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", diff --git a/test/integration/commands/smapi-commands-test.js b/test/integration/commands/smapi-commands-test.js index 296d7c1b..76f59cba 100644 --- a/test/integration/commands/smapi-commands-test.js +++ b/test/integration/commands/smapi-commands-test.js @@ -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"); @@ -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)); @@ -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; @@ -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); @@ -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"); }); -}); \ No newline at end of file +});