mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
4b41d1b8f6
The public documentation hasn't been updated, but the task is available. See [here](https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/CacheV2). Fixes #4757
77 lines
2 KiB
YAML
77 lines
2 KiB
YAML
steps:
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: '$(nodeVersion)'
|
|
displayName: 'Install Node.js'
|
|
|
|
- task: UsePythonVersion@0
|
|
inputs:
|
|
versionSpec: '$(pythonVersion)'
|
|
displayName: 'Install Python'
|
|
|
|
- bash: python -m pip install --upgrade pip
|
|
displayName: 'Install python tools'
|
|
|
|
- bash: |
|
|
set -e
|
|
git config --global user.email 'bot@renovateapp.com'
|
|
git config --global user.name 'Renovate Bot'
|
|
node --version
|
|
python --version
|
|
yarn --version
|
|
pip --version
|
|
displayName: 'Init platform'
|
|
|
|
- checkout: self
|
|
fetchDepth: 5
|
|
path: renovate
|
|
|
|
- task: Cache@2
|
|
inputs:
|
|
key: yarn_cache | $(Agent.OS) | $(Build.SourcesDirectory)/yarn.lock
|
|
path: $(YARN_CACHE_FOLDER)
|
|
displayName: Cache Yarn packages
|
|
continueOnError: true
|
|
|
|
- task: Cache@2
|
|
inputs:
|
|
key: yarn | "$(nodeVersion)" | $(Agent.OS) | $(Build.SourcesDirectory)/yarn.lock
|
|
path: $(Build.SourcesDirectory)/node_modules
|
|
displayName: Cache node_modules
|
|
continueOnError: true
|
|
|
|
- bash: |
|
|
set -e
|
|
yarn install --frozen-lockfile --link-duplicates
|
|
pip install --user -r requirements.txt
|
|
displayName: 'Installing Dependencies'
|
|
|
|
- bash: |
|
|
set -e
|
|
yarn lint
|
|
yarn test-schema
|
|
yarn type-check
|
|
displayName: 'Lint'
|
|
|
|
- bash: yarn build
|
|
displayName: 'Build'
|
|
|
|
- bash: yarn jest --maxWorkers=2 --ci --reporters=default --reporters=jest-junit --coverageReporters=text-summary --coverageReporters=cobertura
|
|
displayName: 'Unit Tests'
|
|
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
testResultsFiles: 'junit.xml'
|
|
testRunTitle: 'CI Tests $(Agent.OS)'
|
|
displayName: 'Publish test results'
|
|
condition: succeededOrFailed()
|
|
|
|
- task: PublishCodeCoverageResults@1
|
|
inputs:
|
|
codeCoverageTool: Cobertura
|
|
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/*coverage.xml'
|
|
displayName: 'Publish coverage results'
|
|
condition: succeededOrFailed()
|
|
|
|
- bash: yarn test-e2e
|
|
displayName: 'E2E Tests'
|