cpu-unit-test.yml 1.01 KB
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
strategy:
  matrix:
    python-3.6:
      imageTag: '3.6'
    python-3.7:
      imageTag: '3.7'
14
15
    python-3.8:
      imageTag: '3.8'
16
17
18
19
20
    # TODO
    #python-latest:
    #  imageTag: '3'
  maxParallel: 3

21
22
23
pool:
  vmImage: ubuntu-latest

24
container:
25
  image: python:$(imageTag)
26
27

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