CI: Add integration tests and fix build issue (#26)

This commit is contained in:
Timothee Guerin 2019-05-24 12:55:30 -07:00 коммит произвёл GitHub
Родитель 706f4114f7
Коммит a8ef2037d8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 47 добавлений и 25 удалений

Просмотреть файл

@ -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"]
}