1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/mirrors-QMT

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
azure-pipelines.yml 1.9 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Kewei Li Отправлено 31.05.2019 14:31 eeb5b17
# Docker image
# Build a Docker image to deploy, run, or push to a container registry.
# Add steps that use Docker Compose, tag images, push to a registry, run an image, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
pool:
vmImage: 'Ubuntu 16.04'
variables:
quantumContainerRegistry: quantumdocker.azurecr.io
imageName: $(quantumContainerRegistry)/qmt_base
trigger:
- master
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
- script: python -m pip install --upgrade pip setuptools wheel
displayName: 'Install tools'
- script: |
python -m pip install "black==19.3b0"
black . --check -t py36
displayName: 'Run lint tests'
- task: Docker@1
displayName: Login to QuantumDocker
inputs:
azureSubscriptionEndpoint: 'Station Q Santa Barbara compute cluster'
azureContainerRegistry: $(quantumContainerRegistry)
command: login
- script: docker build . -t $(imageName):$(Build.BuildId) -t $(imageName):latest
displayName: Build QMT Image
- script: mkdir -p $(System.DefaultWorkingDirectory)/test_results/htmlcov
displayName: Create Test Results Directory
- script: docker run -v $(System.DefaultWorkingDirectory)/test_results:/test_results $(imageName) pytest /app/qmt/tests --verbose -n auto --capture=no --junit-xml=/test_results/TEST.xml --cov=qmt --cov-report=xml:/test_results/coverage.xml --cov-report=html:/test_results/htmlcov
displayName: Run QMT Tests
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/TEST.xml'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'
- script: docker push $(imageName)
condition: eq(variables['build.sourceBranch'], 'refs/heads/master')
displayName: Push Image to ACR

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/mirrors-QMT.git
git@api.gitlife.ru:oschina-mirror/mirrors-QMT.git
oschina-mirror
mirrors-QMT
mirrors-QMT
master