Skip to content

Commit

Permalink
Update rest-api-spec-scripts to 0.2 and remote travis-ci jobs (except… (
Browse files Browse the repository at this point in the history
#5742)

* Update rest-api-spec-scripts to 0.2 and remote travis-ci jobs (except branch check)

* return semantic and model

* minor

* modelValidation and semanticValidation use avocado diff.

* Install .Net

* semantic and model

* restore travis

* minor
  • Loading branch information
sergey-shandar authored Apr 24, 2019
1 parent 7ba1368 commit 61e73c3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ script:
npm install
npm run tsc
node scripts/momentOfTruth.js && node scripts/momentOfTruthPostProcessing.js
fi
fi
5 changes: 1 addition & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
- job: "Avocado"
pool:
vmImage: 'Ubuntu 16.04'
continueOnError: true
steps:
- task: Npm@1
displayName: 'npm install'
Expand All @@ -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:
Expand All @@ -82,7 +80,6 @@ jobs:
displayName: 'Breaking Changes'

- job: "LintDiff"
condition: "not(variables['PRIVATE'])"
variables:
NODE_OPTIONS: '--max-old-space-size=8192'
pool:
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion preproduction-azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Preproduction CI for Azure Rest API speciications"
name: "Preproduction CI for Azure Rest API specifications"

trigger: none

Expand Down
11 changes: 6 additions & 5 deletions scripts/modelValidation.js → scripts/modelValidation.ts
Original file line number Diff line number Diff line change
@@ -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,
{
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

0 comments on commit 61e73c3

Please sign in to comment.