cpu-unit-test.yml 958 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
11
12
13
14
15
16
17
18
strategy:
  matrix:
    python-3.6:
      imageTag: '3.6'
    python-3.7:
      imageTag: '3.7'
    # TODO
    #python-latest:
    #  imageTag: '3'
  maxParallel: 3

19
20
21
pool:
  vmImage: ubuntu-latest

22
container:
23
  image: python:$(imageTag)
24
25

steps:
26
27
28
  - script: |
      echo "##vso[task.prependpath]$HOME/.local/bin"
    displayName: Export path
29
  - script: |
30
      python3 -m pip install .[test,cpuworker]
31
      make postinstall
32
33
34
35
36
37
38
39
40
41
42
    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: |
43
      bash <(curl -s https://codecov.io/bash) -cF cpu-python$(imageTag)-unit-test
44
45
46
    displayName: Report coverage results
    env:
      CODECOV_TOKEN: $(codecovToken)