# Xcode
# Build, test, and archive an Xcode workspace on macOS.
# Add steps that install certificates, test, sign, and distribute an app, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/xcode


trigger:
- master
- development

pool:
  vmImage: 'macOS-10.14'

variables:
  BUNDLER_PATH: vendor/bundle
  ARTIFACTS_DEFAULT_PATH: build
  TEST_REPORTS_DEFAULT_PATH: reports

steps:
- script: rake setup
  displayName: 'Configure project'
- script: rake xcode:tests[true]
  displayName: 'Run tests'
  env:
    DANGER_GITHUB_API_TOKEN: $(danger-github-api-token)
- task: PublishTestResults@2
  inputs:
    testRunner: JUnit
    testResultsFiles: $(TEST_REPORTS_DEFAULT_PATH)/*.xml
  condition: succeededOrFailed()
- task: PublishPipelineArtifact@0
  inputs:
    artifactName: 'logs'
    targetPath: $(ARTIFACTS_DEFAULT_PATH)
  condition: succeededOrFailed()
- task: PublishPipelineArtifact@0
  inputs:
    artifactName: 'testResults'
    targetPath: $(TEST_REPORTS_DEFAULT_PATH)
  condition: succeededOrFailed()

# Xcode
# Build, test, and archive an Xcode workspace on macOS.
# Add steps that install certificates, test, sign, and distribute an app, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/xcode


trigger:
- master
- development

pool:
  vmImage: 'macOS-10.14'

variables:
  BUNDLER_PATH: vendor/bundle
  ARTIFACTS_DEFAULT_PATH: build
  TEST_REPORTS_DEFAULT_PATH: reports

steps:
- task: UseRubyVersion@0
  inputs:
    versionSpec: '2.6.3'
    addToPath: true
- script: rake setup
  displayName: 'Configure project'
- script: rake xcode:tests[true]
  displayName: 'Run tests'
  env:
    DANGER_GITHUB_API_TOKEN: $(danger-github-api-token)
- task: PublishTestResults@2
  inputs:
    testRunner: JUnit
    testResultsFiles: $(TEST_REPORTS_DEFAULT_PATH)/*.xml
  condition: succeededOrFailed()
- task: PublishPipelineArtifact@0
  inputs:
    artifactName: 'logs'
    targetPath: $(ARTIFACTS_DEFAULT_PATH)
  condition: succeededOrFailed()
- task: PublishPipelineArtifact@0
  inputs:
    artifactName: 'testResults'
    targetPath: $(TEST_REPORTS_DEFAULT_PATH)
  condition: succeededOrFailed()

Use correct ruby version on CI
Use correct ruby version on CI

Signed-off-by: Diogo Tridapalli <212c3bd832d63e5ff969ce7ec62760356eb8132c@users.noreply.github.com>
