diff --git a/.travis.yml b/.travis.yml index 9bc5dc2c7f75..7cf1bcf34253 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,4 +49,4 @@ script: npm install npm run tsc node scripts/momentOfTruth.js && node scripts/momentOfTruthPostProcessing.js - fi + fi \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 311579a274fd..3f863a2365ae 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -58,7 +58,6 @@ jobs: - job: "Avocado" pool: vmImage: 'Ubuntu 16.04' - continueOnError: true steps: - task: Npm@1 displayName: 'npm install' @@ -68,12 +67,11 @@ jobs: displayName: 'Avocado' - job: "BreakingChange" - condition: "not(variables['PRIVATE'])" pool: vmImage: 'Ubuntu 16.04' steps: - script: 'scripts/install-dotnet.sh' - displayName: 'Insall .Net' + displayName: 'Install .Net' - task: Npm@1 displayName: 'npm install' inputs: @@ -82,7 +80,6 @@ jobs: displayName: 'Breaking Changes' - job: "LintDiff" - condition: "not(variables['PRIVATE'])" variables: NODE_OPTIONS: '--max-old-space-size=8192' pool: diff --git a/package.json b/package.json index c9e130ae6788..9de64abe4b93 100644 --- a/package.json +++ b/package.json @@ -10,13 +10,13 @@ "description": "Tests for Azure REST API Specifications", "license": "MIT", "devDependencies": { - "@azure/avocado": "^0.3.3", - "@azure/oad": "^0.5.1", - "@azure/rest-api-specs-scripts": "^0.1.8", + "@azure/avocado": "^0.4.1", + "@azure/oad": "^0.6.3", + "@azure/rest-api-specs-scripts": "^0.2.21", "@microsoft.azure/async-io": "^2.0.21", "@microsoft.azure/literate": "^1.0.25", "@microsoft.azure/polyfill": "^1.0.19", - "@octokit/rest": "^16.24.1", + "@octokit/rest": "^16.25.0", "@ts-common/commonmark-to-markdown": "^1.2.0", "@ts-common/fs": "0.2.0", "@types/fs-extra": "^5.0.5", diff --git a/preproduction-azure-pipelines.yml b/preproduction-azure-pipelines.yml index 122c66f7376d..98357c38746a 100644 --- a/preproduction-azure-pipelines.yml +++ b/preproduction-azure-pipelines.yml @@ -1,4 +1,4 @@ -name: "Preproduction CI for Azure Rest API speciications" +name: "Preproduction CI for Azure Rest API specifications" trigger: none diff --git a/scripts/modelValidation.js b/scripts/modelValidation.ts similarity index 73% rename from scripts/modelValidation.js rename to scripts/modelValidation.ts index 9125836799a9..d96a93e78bba 100644 --- a/scripts/modelValidation.js +++ b/scripts/modelValidation.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License in the project root for license information. -'use strict'; -const utils = require('../test/util/utils') -const cp = require("child_process") +import { devOps, cli } from '@azure/avocado' +import { utils } from '@azure/rest-api-specs-scripts' +import * as cp from 'child_process' -const exec = (cmd, options) => { +const exec = (cmd: string, options?: cp.SpawnSyncOptions) => { const result = cp.spawnSync( cmd, { @@ -18,7 +18,8 @@ const exec = (cmd, options) => { } async function main() { - const swaggersToProcess = utils.getFilesChangedInPR(); + const pr = await devOps.createPullRequestProperties(cli.defaultConfig()) + const swaggersToProcess = await utils.getFilesChangedInPR(pr); let result = 0 for (const swagger of swaggersToProcess) { try { diff --git a/scripts/semanticValidation.js b/scripts/semanticValidation.ts similarity index 74% rename from scripts/semanticValidation.js rename to scripts/semanticValidation.ts index f3c2f3d89de6..2cff59e18f98 100644 --- a/scripts/semanticValidation.js +++ b/scripts/semanticValidation.ts @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License in the project root for license information. -'use strict'; -const utils = require('../test/util/utils') -const oav = require('oav'); +import { devOps, cli } from '@azure/avocado' +import { utils } from '@azure/rest-api-specs-scripts' +import * as oav from 'oav' async function main() { - const swaggersToProcess = utils.getFilesChangedInPR(); + const pr = await devOps.createPullRequestProperties(cli.defaultConfig()) + const swaggersToProcess = await utils.getFilesChangedInPR(pr); // Useful when debugging a test for a particular swagger. // Just update the regex. That will return an array of filtered items. // swaggersToProcess = swaggersToProcess.filter(function(item) {