# Copyright the Hyperledger Fabric contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

name: $(SourceBranchName)-$(Date:yyyyMMdd)$(Rev:.rrr)
trigger:
- master
- release-2.*
pr: none

variables:
  GOPATH: $(Agent.BuildDirectory)/go
  PATH: $(Agent.BuildDirectory)/go/bin:/usr/local/go/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
  GOVER: 1.14.4

jobs:
  - job: UnitTests
    pool:
      vmImage: ubuntu-18.04
    steps:
      - template: install_deps.yml
      - checkout: self
        path: 'go/src/github.com/hyperledger/fabric'
        displayName: Checkout Fabric Code
      - script: ./ci/scripts/setup_hsm.sh
        displayName: Install SoftHSM
      - script: make unit-test
        displayName: Run Unit Tests
