Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rest-api-spec-scripts to 0.2 and remote travis-ci jobs (except… #5742

Merged
merged 8 commits into from
Apr 24, 2019
Merged
Show file tree
Hide file tree
Changes from 7 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
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
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