Skip to content

Commit

Permalink
[v6] Fix failing ci (#645)
Browse files Browse the repository at this point in the history
* Restructure CI

* Reuse Build steps
  • Loading branch information
joheredi authored May 15, 2020
1 parent 11bf7a0 commit 72af825
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 25 deletions.
9 changes: 9 additions & 0 deletions .scripts/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.x"
displayName: "Install Node.js"
- script: |
npm install
npm run build
displayName: "Build"
45 changes: 21 additions & 24 deletions .scripts/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,29 @@ trigger:
pool:
vmImage: 'ubuntu-latest'

steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
jobs:
- job: Build
steps:
- template: build.yml
- script: npm run test
displayName: 'Run Tests'

- script: |
npm install
npm run build
displayName: 'Build'
- script: npm run check:tree
displayName: 'Check git Tree'

- script: |
npm run test
npm run check:tree
displayName: 'Run Tests'
- script: |
npm run coverage-push -- $(Build.Repository.Name) $(Build.SourceBranch) $(github-token) $(storage-coverage-user) $(storage-coverage-pass)
workingDirectory: node_modules/@microsoft.azure/autorest.testserver
displayName: 'Upload Coverage Report'
- script: |
npm run clone:specs
displayName: 'Clone Specs Repository'
- job: SmokeTest
steps:
- template: build.yml
- script: npm run clone:specs
displayName: 'Clone Specs Repository'

- script: |
npm run smoke-test
npm run check:tree
displayName: 'Run Smoke Tests'
- script: npm run smoke-test
displayName: 'Run Smoke Tests'

- script: |
npm run coverage-push -- $(Build.Repository.Name) $(Build.SourceBranch) $(github-token) $(storage-coverage-user) $(storage-coverage-pass)
workingDirectory: node_modules/@microsoft.azure/autorest.testserver
displayName: 'Upload Coverage Report'
- script: npm run check:tree
displayName: 'Check git Tree'
2 changes: 1 addition & 1 deletion test/integration/noMappers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NoMappersClient } from "./generated/noMappers/src/noMappersClient";
import { assert } from "chai";
describe("Swagger that needs no mapper", () => {
it("should be able to instantiate a new client without Typescript errors", () => {
const client = new NoMappersClient("http://localhost:3000");
const client = new NoMappersClient("http://localhost:3000", "one");
assert.isDefined(client);
});
});

0 comments on commit 72af825

Please sign in to comment.