From baed886ae9a67d35f03b1a5714cd0ec4a8fb2c55 Mon Sep 17 00:00:00 2001 From: pp81381 Date: Tue, 2 Apr 2019 01:03:03 +0100 Subject: [PATCH 1/6] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 58 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..cfe1e30 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,58 @@ +# 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 + +jobs: + +- job: 'Test' + pool: + vmImage: 'Ubuntu-16.04' + strategy: + matrix: + Python27: + python.version: '2.7' + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' + maxParallel: 4 + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: 'x64' + + - script: python -m pip install --upgrade pip && pip install -r requirements.txt + displayName: 'Install dependencies' + + - script: | + pip install pytest + pytest tests --doctest-modules --junitxml=junit/test-results.xml + displayName: 'pytest' + + - task: PublishTestResults@2 + inputs: + testResultsFiles: '**/test-results.xml' + testRunTitle: 'Python $(python.version)' + condition: succeededOrFailed() + +- job: 'Publish' + dependsOn: 'Test' + pool: + vmImage: 'Ubuntu-16.04' + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.x' + architecture: 'x64' + + - script: python setup.py sdist + displayName: 'Build sdist' From 024e6e664e5e7c34a9f6ce4d48f8a1d095653958 Mon Sep 17 00:00:00 2001 From: pp81381 Date: Tue, 2 Apr 2019 13:33:22 +0100 Subject: [PATCH 2/6] Create requirements.txt Added requirement.txt to support azure build --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e926320 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pyserial>=3.4 +pyserial_asyncio>=0.4 From 1d0fa2e6a5a269cf6382d8c5730c5948bf8c55e4 Mon Sep 17 00:00:00 2001 From: pp81381 Date: Tue, 2 Apr 2019 22:00:52 +0100 Subject: [PATCH 3/6] Update azure-pipelines.yml for Azure Pipelines [skip ci] Fix test path --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cfe1e30..7dfb4c4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,7 +34,7 @@ jobs: - script: | pip install pytest - pytest tests --doctest-modules --junitxml=junit/test-results.xml + pytest rsp1570serial/tests --doctest-modules --junitxml=junit/test-results.xml displayName: 'pytest' - task: PublishTestResults@2 From fae7e53d1efcfe15ba53c50a942d8b517b427f7b Mon Sep 17 00:00:00 2001 From: pp81381 Date: Tue, 2 Apr 2019 22:03:04 +0100 Subject: [PATCH 4/6] Update azure-pipelines.yml for Azure Pipelines [skip ci] Remove Python 2 Comment out Python 3.6 and 3.7 for now --- azure-pipelines.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7dfb4c4..c2bfb85 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,14 +13,12 @@ jobs: vmImage: 'Ubuntu-16.04' strategy: matrix: - Python27: - python.version: '2.7' Python35: python.version: '3.5' - Python36: - python.version: '3.6' - Python37: - python.version: '3.7' +# Python36: +# python.version: '3.6' +# Python37: +# python.version: '3.7' maxParallel: 4 steps: From cefa0faea7d118a0e952cdd37804b9eb8c6d1218 Mon Sep 17 00:00:00 2001 From: pp81381 Date: Tue, 2 Apr 2019 22:10:00 +0100 Subject: [PATCH 5/6] Added aiounittest dependency --- requirements.txt | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e926320..61dde39 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ pyserial>=3.4 pyserial_asyncio>=0.4 +aiounittest>=1.1.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 7a57f51..08a70b6 100644 --- a/setup.py +++ b/setup.py @@ -24,5 +24,5 @@ "Development Status :: 4 - Beta", ], python_requires='~=3.5', - install_requires=['pyserial>=3.4', 'pyserial_asyncio>=0.4'], + install_requires=['pyserial>=3.4', 'pyserial_asyncio>=0.4', 'aiounittest>=1.1.0'], ) \ No newline at end of file From f201440bcf316bc7f214e6bd039c3b6266963de5 Mon Sep 17 00:00:00 2001 From: pp81381 Date: Tue, 2 Apr 2019 22:20:36 +0100 Subject: [PATCH 6/6] Update azure-pipelines.yml for Azure Pipelines [skip ci] Added back Python 3.6 and 3.7 --- azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c2bfb85..7c61571 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,10 +15,10 @@ jobs: matrix: Python35: python.version: '3.5' -# Python36: -# python.version: '3.6' -# Python37: -# python.version: '3.7' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' maxParallel: 4 steps: