зеркало из https://github.com/Azure/git-rest-api.git
CI: Add integration tests and fix build issue (#26)
This commit is contained in:
Родитель
706f4114f7
Коммит
a8ef2037d8
70
.ci/ci.yml
70
.ci/ci.yml
|
@ -1,33 +1,55 @@
|
|||
pool:
|
||||
vmImage: "Ubuntu 16.04"
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "10.x"
|
||||
jobs:
|
||||
- job: test
|
||||
displayName: Tests
|
||||
pool:
|
||||
vmImage: "Ubuntu-16.04"
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "10.x"
|
||||
|
||||
- script: npm -s ci
|
||||
displayName: "Install dependencies"
|
||||
- script: npm -s ci
|
||||
displayName: "Install dependencies"
|
||||
|
||||
- script: npm run -s test:ci
|
||||
displayName: "Test"
|
||||
- script: npm run -s test:ci
|
||||
displayName: "Test"
|
||||
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testRunner: JUnit
|
||||
testResultsFiles: ./test-results.xml
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testRunner: JUnit
|
||||
testResultsFiles: ./test-results.xml
|
||||
|
||||
- task: PublishCodeCoverageResults@1
|
||||
inputs:
|
||||
codeCoverageTool: Cobertura
|
||||
summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/*coverage.xml"
|
||||
reportDirectory: "$(System.DefaultWorkingDirectory)/**/coverage"
|
||||
- task: PublishCodeCoverageResults@1
|
||||
inputs:
|
||||
codeCoverageTool: Cobertura
|
||||
summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/*coverage.xml"
|
||||
reportDirectory: "$(System.DefaultWorkingDirectory)/**/coverage"
|
||||
|
||||
- script: npm run -s sdk:gen
|
||||
displayName: "SDK gen"
|
||||
- script: npm run -s sdk:gen
|
||||
displayName: "SDK gen"
|
||||
|
||||
- script: npm run -s lint
|
||||
displayName: "Lint"
|
||||
- script: npm run -s lint
|
||||
displayName: "Lint"
|
||||
|
||||
- job: build
|
||||
displayName: Build and integration tests
|
||||
pool:
|
||||
vmImage: "Ubuntu-16.04"
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "10.x"
|
||||
|
||||
- script: npm -s ci
|
||||
displayName: "Install dependencies"
|
||||
|
||||
- script: npm run -s build
|
||||
displayName: "Build"
|
||||
|
||||
- script: |
|
||||
npm run -s start:prod &
|
||||
npm run -s test:e2e
|
||||
displayName: "Run integration tests"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": ["node_modules", "bin", "test", "../src/**/*.test.ts"]
|
||||
"exclude": ["node_modules", "bin", "../test", "../src/**/*.test.ts", "../src/**/*.e2e.ts"]
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче