Created
November 11, 2020 03:27
-
-
Save samlucax/38bfa3e310fabea603a6666674d4d920 to your computer and use it in GitHub Desktop.
Workshop CWI YAML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Node.js | |
# Build a general Node.js project with npm. | |
# Add steps that analyze code, save build artifacts, deploy, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript | |
# quando o pipeline deve ser executado? | |
trigger: | |
- main | |
# qual máquina o pipeline deve ser executado? | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- task: NodeTool@0 | |
inputs: | |
versionSpec: '12.x' | |
displayName: 'Instalando o NodeJS' | |
# # para windows o path é diferente | |
# - task: CacheBeta@1 | |
# inputs: | |
# key: cypress | $(Agent.OS) | package-lock.json | |
# path: /home/vsts/.cache/Cypress | |
# restoreKeys: cypress | $(Agent.OS) | package-lock.json | |
# displayName: Cache Cypress binary | |
- script: npm install | |
displayName: 'npm install and build' | |
# como executar os testes, preciso abrir o Cypress? | |
- script: npx cypress run | |
displayName: 'executando os testes do cypress' | |
continueOnError: true | |
# https://docs.cypress.io/guides/guides/command-line.html#cypress-run | |
- script: npx cypress run --browser chrome --headless | |
displayName: 'executando testes no firefox' | |
continueOnError: true | |
- script: npx cypress run --browser firefox --headless | |
displayName: 'executando testes no firefox' | |
continueOnError: true | |
# - task: PublishTestResults@2 | |
# inputs: | |
# testResultsFormat: 'JUnit' | |
# testResultsFiles: '**/junit*.xml' | |
# mergeTestResults: true | |
# continueOnError: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment