git-rest-api/.ci/ci.yml

60 строки
1.4 KiB
YAML

trigger:
- master
pr:
- master
jobs:
- job: test
displayName: Tests
pool:
name: AzurePipelines-EO
vmImage: "AzurePipelinesUbuntu20.04compliant"
steps:
- task: NodeTool@0
inputs:
versionSpec: "12.x"
- script: npm ci
displayName: "Install dependencies"
- script: npm run -s test:ci
displayName: "Test"
- 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"
# - script: npm run -s sdk:gen
# displayName: "SDK gen"
- script: npm run lint
displayName: "Lint"
- job: build
displayName: Build and integration tests
pool:
name: AzurePipelines-EO
vmImage: "AzurePipelinesUbuntu20.04compliant"
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.x"
- script: npm ci
displayName: "Install dependencies"
- script: npm run build
displayName: "Build"
# - script: |
# npm run -s start:prod &
# npm run -s test:e2e
# displayName: "Run integration tests"