.devops/code-review-pipelines.yml
# Azure DevOps pipeline to build, check source codes and run tests.
# Automatically triggered on PR
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema#pr-trigger
trigger: none
resources:
repositories:
- repository: pagopaCommons
type: github
name: pagopa/azure-pipeline-templates
ref: refs/tags/v15
endpoint: 'io-azure-devops-github-ro'
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: Build
dependsOn: []
jobs:
- job: make_build
steps:
- template: templates/node-job-setup/template.yaml@pagopaCommons
- script: |
yarn build
displayName: 'Build'
- stage: Static_analysis
dependsOn: []
jobs:
- job: lint
steps:
- template: templates/node-job-setup/template.yaml@pagopaCommons
- script: |
yarn lint
displayName: 'Lint'
- stage: Test
dependsOn: []
jobs:
- job: unit_tests
steps:
- template: templates/node-job-setup/template.yaml@pagopaCommons
- script: |
yarn test
displayName: 'Unit tests exec'
- bash: |
bash <(curl -s https://codecov.io/bash)
displayName: 'Code coverage'