cpu-unit-test.yml 762 Bytes
Newer Older
1
2
3
4
5
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

trigger:
  - main
6
  - release/*
7

8
9
10
pool:
  vmImage: ubuntu-latest

11
12
13
14
container:
  image: python:3.7

steps:
15
16
17
  - script: |
      echo "##vso[task.prependpath]$HOME/.local/bin"
    displayName: Export path
18
19
  - script: |
      python3 -m pip install .[test,torch]
20
      make postinstall
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    displayName: Install dependencies
  - script: |
      python3 setup.py lint
    displayName: Run code lint
  - script: |
      python3 setup.py test
    displayName: Run unit tests
    timeoutInMinutes: 10
    env:
      SB_TEST_CUDA: '0'
  - script: |
      bash <(curl -s https://codecov.io/bash) -cF cpu-unit-test
    displayName: Report coverage results
    env:
      CODECOV_TOKEN: $(codecovToken)