azure-pipelines.yml 2.09 KB
Newer Older
Gems Guo's avatar
Gems Guo committed
1
jobs:
chicm-ms's avatar
chicm-ms committed
2
3
4
5
6
7
8
- job: 'basic_test_pr_ubuntu'
  pool:
    vmImage: 'Ubuntu 16.04'
  strategy:
    matrix:
      Python36:
        PYTHON_VERSION: '3.6'
Gems Guo's avatar
Gems Guo committed
9
10

  steps:
11
  - script: python3 -m pip install --upgrade pip setuptools --user
Gems Guo's avatar
Gems Guo committed
12
13
14
15
    displayName: 'Install python tools'
  - script: |
      source install.sh
    displayName: 'Install nni toolkit via source code'
16
17
  - script: |
      python3 -m pip install flake8 --user
18
      IGNORE=./tools/nni_annotation/testcase/*:F821,./examples/trials/mnist-nas/*/mnist*.py:F821
19
20
      python3 -m flake8 . --count --per-file-ignores=$IGNORE --select=E9,F63,F72,F82 --show-source --statistics
    displayName: 'Run flake8 tests to find Python syntax errors and undefined names'
21
22
23
24
  - script: |
      cd test
      source unittest.sh
    displayName: 'Unit test'
Gems Guo's avatar
Gems Guo committed
25
26
27
  - script: |
      cd test
      PATH=$HOME/.local/bin:$PATH python3 naive_test.py
28
29
30
31
32
    displayName: 'Naive test'
  - script: |
      cd test
      PATH=$HOME/.local/bin:$PATH python3 tuner_test.py
    displayName: 'Built-in tuners / assessors tests'
Gems Guo's avatar
Gems Guo committed
33
34
  - script: |
      cd test
35
36
      PATH=$HOME/.local/bin:$PATH python3 metrics_test.py
    displayName: 'Trial job metrics test'
chicm-ms's avatar
chicm-ms committed
37
38
39
40
  - script: |
      cd test
      PATH=$HOME/.local/bin:$PATH python3 cli_test.py
    displayName: 'nnicli test'
41

chicm-ms's avatar
chicm-ms committed
42
- job: 'basic_test_pr_macOS'
43
44
45
46
47
48
49
50
51
52
53
54
55
  pool:
    vmImage: 'macOS 10.13'
  strategy:
    matrix:
      Python36:
        PYTHON_VERSION: '3.6'

  steps:
  - script: python3 -m pip install --upgrade pip setuptools
    displayName: 'Install python tools'
  - script: |
      source install.sh
    displayName: 'Install nni toolkit via source code'
56
57
58
59
  - script: |
      cd test
      PATH=$HOME/Library/Python/3.7/bin:$PATH && source unittest.sh
    displayName: 'Unit test'
60
61
62
  - script: |
      cd test
      PATH=$HOME/Library/Python/3.7/bin:$PATH python3 naive_test.py
63
    displayName: 'Naive test'
64
65
  - script: |
      cd test
66
67
      PATH=$HOME/Library/Python/3.7/bin:$PATH python3 tuner_test.py
    displayName: 'Built-in tuners / assessors tests'
chicm-ms's avatar
chicm-ms committed
68
69
70
71
  - script: |
      cd test
      PATH=$HOME/Library/Python/3.7/bin:$PATH python3 cli_test.py
    displayName: 'nnicli test'