brew/azure-pipelines.yml
Mike McQuaid 382e0ed7b4
azure-pipelines-yml: early exit on errors.
We don't want to silently ignore failing commands.

Also, while we're editing the `tap-new` generated `azure-pipelines.yml`
also add the changes missed here from #5600.
2019-01-24 20:45:00 +00:00

56 lines
1.7 KiB
YAML

jobs:
- job: macOS
pool:
vmImage: macOS-10.13
steps:
- bash: |
set -e
sudo xcode-select --switch /Applications/Xcode_10.1.app/Contents/Developer
HOMEBREW_REPOSITORY="$(brew --repo)"
mv "$HOMEBREW_REPOSITORY/Library/Taps" "$PWD/Library"
sudo rm -rf "$HOMEBREW_REPOSITORY"
sudo ln -s "$PWD" "$HOMEBREW_REPOSITORY"
brew update-reset Library/Taps/homebrew/homebrew-core
brew test-bot
displayName: Run brew test-bot
env:
HOMEBREW_GITHUB_API_TOKEN: $(github.publicApiToken)
HOMEBREW_COVERALLS_REPO_TOKEN: $(coveralls.homebrewBrewApiToken)
- task: PublishTestResults@2
displayName: Publish test-bot test results
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: brew-test-bot.xml
- task: PublishCodeCoverageResults@1
displayName: Publish brew tests code coverage
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(Build.SourcesDirectory)/coverage/coverage.xml
reportDirectory: $(Build.SourcesDirectory)/coverage
failIfCoverageEmpty: true
- job: Linux
pool:
vmImage: ubuntu-16.04
steps:
- bash: |
set -e
HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew
sudo mkdir -p /home/linuxbrew
sudo mv "$PWD" "$HOMEBREW_REPOSITORY"
sudo ln -s "$HOMEBREW_REPOSITORY" "$PWD"
"$HOMEBREW_REPOSITORY/bin/brew" test-bot
displayName: Run brew test-bot
env:
HOMEBREW_GITHUB_API_TOKEN: $(github.publicApiToken)
- task: PublishTestResults@2
displayName: Publish test-bot test results
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: brew-test-bot.xml