Skip to content

Commit

Permalink
Added an azure pipeline configuration file. (#575)
Browse files Browse the repository at this point in the history
Added an azure pipeline configuration file.
  • Loading branch information
gabrieldemarmiesse authored and Qwlouse committed Aug 7, 2019
1 parent d3fe102 commit 2b1e756
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 1 deletion.
77 changes: 77 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

jobs:
- job: test
strategy:
matrix:
Windows py35:
IMAGE_NAME: 'vs2017-win2016'
PYTHON_VERSION: '3.5'
TOX_CMD: 'py35'
Windows py36:
IMAGE_NAME: 'vs2017-win2016'
PYTHON_VERSION: '3.6'
TOX_CMD: 'py36'
Windows py37:
IMAGE_NAME: 'vs2017-win2016'
PYTHON_VERSION: '3.7'
TOX_CMD: 'py37'
OSX py35:
IMAGE_NAME: 'macos-10.13'
PYTHON_VERSION: '3.5'
TOX_CMD: 'py35'
OSX py36:
IMAGE_NAME: 'macos-10.13'
PYTHON_VERSION: '3.6'
TOX_CMD: 'py36'
OSX py37:
IMAGE_NAME: 'macos-10.13'
PYTHON_VERSION: '3.7'
TOX_CMD: 'py37'
Linux py35:
IMAGE_NAME: 'ubuntu-16.04'
PYTHON_VERSION: '3.5'
TOX_CMD: 'py35'
Linux py36:
IMAGE_NAME: 'ubuntu-16.04'
PYTHON_VERSION: '3.6'
TOX_CMD: 'py36'
Linux py37:
IMAGE_NAME: 'ubuntu-16.04'
PYTHON_VERSION: '3.7'
TOX_CMD: 'py37'
Linux tensorflow_112:
IMAGE_NAME: 'ubuntu-16.04'
PYTHON_VERSION: '3.6'
TOX_CMD: 'tensorflow-112'
Linux tensorflow_113:
IMAGE_NAME: 'ubuntu-16.04'
PYTHON_VERSION: '3.6'
TOX_CMD: 'tensorflow-113'
Linux tensorflow-114:
IMAGE_NAME: 'ubuntu-16.04'
PYTHON_VERSION: '3.7'
TOX_CMD: 'tensorflow-114'
Linux tensorflow_2:
IMAGE_NAME: 'ubuntu-16.04'
PYTHON_VERSION: '3.7'
TOX_CMD: 'tensorflow-2'
Linux setup:
IMAGE_NAME: 'ubuntu-16.04'
PYTHON_VERSION: '3.7'
TOX_CMD: 'setup'
Linux flake8:
IMAGE_NAME: 'ubuntu-16.04'
PYTHON_VERSION: '3.7'
TOX_CMD: 'flake8'
Linux coverage:
IMAGE_NAME: 'ubuntu-16.04'
PYTHON_VERSION: '3.7'
TOX_CMD: 'coverage'
pool:
vmImage: $(IMAGE_NAME)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
- bash: pip install tox
- bash: tox -e $TOX_CMD
5 changes: 4 additions & 1 deletion tests/test_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# coding=utf-8

import os.path
import os

import mock
import pytest
Expand Down Expand Up @@ -36,6 +37,7 @@ def test_pep440_version_pattern_invalid():
assert PEP440_VERSION_PATTERN.match('version 4') is None


@pytest.mark.skipif(os.name == 'nt', reason='Weird win bug')
def test_source_get_digest():
assert get_digest(EXAMPLE_SOURCE) == EXAMPLE_DIGEST

Expand All @@ -49,13 +51,14 @@ def test_source_create_non_existing():
with pytest.raises(ValueError):
Source.create('doesnotexist.py')


@pytest.mark.skipif(os.name == 'nt', reason='Weird win bug')
def test_source_create_py():
s = Source.create(EXAMPLE_SOURCE)
assert s.filename == os.path.abspath(EXAMPLE_SOURCE)
assert s.digest == EXAMPLE_DIGEST


@pytest.mark.skipif(os.name == 'nt', reason='Weird win bug')
def test_source_to_json():
s = Source.create(EXAMPLE_SOURCE)
assert s.to_json() == (os.path.abspath(EXAMPLE_SOURCE), EXAMPLE_DIGEST)
Expand Down

0 comments on commit 2b1e756

Please sign in to comment.