From c491e06e107b7b2049ee82db20a59b5f8c9621e3 Mon Sep 17 00:00:00 2001 From: Ivelin Dochev Date: Wed, 18 Mar 2020 09:11:44 +0200 Subject: [PATCH 1/4] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..7d405f9ee --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,36 @@ +# Python package +# Create and test a Python package on multiple Python versions. +# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/python + +trigger: +- master + +pool: + vmImage: 'ubuntu-latest' +strategy: + matrix: + Python27: + python.version: '2.7' + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' + +steps: +- task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + displayName: 'Use Python $(python.version)' + +- script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'pytest' From 5a7e2f9899639e10a405f371da914bd6885e993f Mon Sep 17 00:00:00 2001 From: Ivelin Dochev Date: Wed, 18 Mar 2020 10:12:27 +0200 Subject: [PATCH 2/4] Update test_test1.py --- test_test1.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test_test1.py b/test_test1.py index df1dc6821..e58bed9fd 100644 --- a/test_test1.py +++ b/test_test1.py @@ -1 +1,6 @@ -print('Hello World') +def func(a): + return a - 1 + +def test_testmethod(): + assert fucn(6) == 5 + From 334ae48bcf80744917a7a31f2559dfd5ea77017f Mon Sep 17 00:00:00 2001 From: Ivelin Dochev Date: Wed, 18 Mar 2020 10:19:05 +0200 Subject: [PATCH 3/4] Delete test_test1.py --- test_test1.py | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 test_test1.py diff --git a/test_test1.py b/test_test1.py deleted file mode 100644 index e58bed9fd..000000000 --- a/test_test1.py +++ /dev/null @@ -1,6 +0,0 @@ -def func(a): - return a - 1 - -def test_testmethod(): - assert fucn(6) == 5 - From 2b191da9fa3c71fe0a0e5d29aa27dd140820fcf5 Mon Sep 17 00:00:00 2001 From: Ivelin Dochev Date: Wed, 18 Mar 2020 10:20:53 +0200 Subject: [PATCH 4/4] Create test_firsttest.py --- test_firsttest.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test_firsttest.py diff --git a/test_firsttest.py b/test_firsttest.py new file mode 100644 index 000000000..458f2ae00 --- /dev/null +++ b/test_firsttest.py @@ -0,0 +1,5 @@ +def func(a): + return a - 1 + +def test_testmethod(): + assert func(6) == 5