From d3657a147b95b95318add949fb4061bbf2a296a6 Mon Sep 17 00:00:00 2001 From: Sanath Kumar Ramesh Date: Mon, 3 Jun 2019 15:35:08 -0700 Subject: [PATCH 1/7] AppVeyor to run unit tests --- appveyor.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..e4ef13d6b9 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,33 @@ +version: 1.0.{build} +image: ubuntu +environment: + AWS_DEFAULT_REGION: us-east-1 + matrix: + - PYTHON_HOME: C:\Python27-x64 + PYTHON_VERSION: '2.7' + PYTHON_ARCH: '32' + + - PYTHON_HOME: C:\Python36-x64 + PYTHON_VERSION: '3.6' + PYTHON_ARCH: '64' + + # Testing on both 32bit and 64bit Windows only for Latest Python version, + # because MSIs installers use Latest Python version + - PYTHON_HOME: C:\Python37 + PYTHON_VERSION: '3.7' + PYTHON_ARCH: '32' + + - PYTHON_HOME: C:\Python37-x64 + PYTHON_VERSION: '3.7' + PYTHON_ARCH: '64' + +build: off +install: +- pip install -e '.[dev]' +test_script: +- pytest --cov samcli --cov-report term-missing --cov-fail-under 95 tests\unit +- flake8 samcli +- flake8 tests\unit tests\integration +- pylint --rcfile .pylintrc samcli + + From 6e99075d8e50f33fcf7e0e1e1021efb2ddd6d401 Mon Sep 17 00:00:00 2001 From: Sanath Kumar Ramesh Date: Mon, 3 Jun 2019 15:45:36 -0700 Subject: [PATCH 2/7] Using virtualenv --- appveyor.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e4ef13d6b9..4b7f36beff 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,6 @@ version: 1.0.{build} image: ubuntu + environment: AWS_DEFAULT_REGION: us-east-1 matrix: @@ -21,13 +22,24 @@ environment: PYTHON_VERSION: '3.7' PYTHON_ARCH: '64' -build: off install: -- pip install -e '.[dev]' + + # Upgrade setuptools, wheel and virtualenv + - python -m pip install --upgrade setuptools wheel virtualenv + + # Create new virtual environment and activate it + - rm -rf venv + - python -m virtualenv venv + - venv\Scripts\activate + - python -c "import sys; print(sys.executable)" + + # Actually install SAM CLI's dependencies + - pip install -e '.[dev]' + test_script: -- pytest --cov samcli --cov-report term-missing --cov-fail-under 95 tests\unit -- flake8 samcli -- flake8 tests\unit tests\integration -- pylint --rcfile .pylintrc samcli + - pytest --cov samcli --cov-report term-missing --cov-fail-under 95 tests\unit + - flake8 samcli + - flake8 tests\unit tests\integration + - pylint --rcfile .pylintrc samcli From cd52e32c2c911949795fc61d3fd0bc68588ec0e4 Mon Sep 17 00:00:00 2001 From: Sanath Kumar Ramesh Date: Mon, 3 Jun 2019 15:49:54 -0700 Subject: [PATCH 3/7] Setting SAM CLI dev=1 --- appveyor.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 4b7f36beff..20006fa098 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,6 +3,8 @@ image: ubuntu environment: AWS_DEFAULT_REGION: us-east-1 + SAM_CLI_DEV: 1 + matrix: - PYTHON_HOME: C:\Python27-x64 PYTHON_VERSION: '2.7' @@ -12,7 +14,7 @@ environment: PYTHON_VERSION: '3.6' PYTHON_ARCH: '64' - # Testing on both 32bit and 64bit Windows only for Latest Python version, + # Testing on both 32bit and 64bit Windows only for Latest Python version, # because MSIs installers use Latest Python version - PYTHON_HOME: C:\Python37 PYTHON_VERSION: '3.7' From 3b288738641827b7470999f43c26c579f1b4ce2a Mon Sep 17 00:00:00 2001 From: Sanath Kumar Ramesh Date: Mon, 3 Jun 2019 15:52:10 -0700 Subject: [PATCH 4/7] run on windows --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 20006fa098..5af627c961 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ version: 1.0.{build} -image: ubuntu +image: Visual Studio 2017 environment: AWS_DEFAULT_REGION: us-east-1 From 5c7f934d44c672eff5126abe33f98f71bcd0ef0c Mon Sep 17 00:00:00 2001 From: Sanath Kumar Ramesh Date: Mon, 3 Jun 2019 15:55:11 -0700 Subject: [PATCH 5/7] wrap commands in quotes --- appveyor.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 5af627c961..8a9d286315 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,42 +6,42 @@ environment: SAM_CLI_DEV: 1 matrix: - - PYTHON_HOME: C:\Python27-x64 + - PYTHON_HOME: "C:\\Python27-x64" PYTHON_VERSION: '2.7' PYTHON_ARCH: '32' - - PYTHON_HOME: C:\Python36-x64 + - PYTHON_HOME: "C:\\Python36-x64" PYTHON_VERSION: '3.6' PYTHON_ARCH: '64' # Testing on both 32bit and 64bit Windows only for Latest Python version, # because MSIs installers use Latest Python version - - PYTHON_HOME: C:\Python37 + - PYTHON_HOME: "C:\\Python37" PYTHON_VERSION: '3.7' PYTHON_ARCH: '32' - - PYTHON_HOME: C:\Python37-x64 + - PYTHON_HOME: "C:\\Python37-x64" PYTHON_VERSION: '3.7' PYTHON_ARCH: '64' install: # Upgrade setuptools, wheel and virtualenv - - python -m pip install --upgrade setuptools wheel virtualenv + - "python -m pip install --upgrade setuptools wheel virtualenv" # Create new virtual environment and activate it - - rm -rf venv - - python -m virtualenv venv - - venv\Scripts\activate - - python -c "import sys; print(sys.executable)" + - "rm -rf venv" + - "python -m virtualenv venv" + - "venv\\Scripts\\activate" + - "python -c \"import sys; print(sys.executable)\"" # Actually install SAM CLI's dependencies - - pip install -e '.[dev]' + - "pip install -e '.[dev]'" test_script: - - pytest --cov samcli --cov-report term-missing --cov-fail-under 95 tests\unit - - flake8 samcli - - flake8 tests\unit tests\integration - - pylint --rcfile .pylintrc samcli + - "pytest --cov samcli --cov-report term-missing --cov-fail-under 95 tests\\unit" + - "flake8 samcli" + - "flake8 tests\\unit tests\\integration" + - "pylint --rcfile .pylintrc samcli" From 9b906fcdc61194592e5f53d1e32f72fd11e6bd59 Mon Sep 17 00:00:00 2001 From: Sanath Kumar Ramesh Date: Mon, 3 Jun 2019 16:05:00 -0700 Subject: [PATCH 6/7] install dev --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 8a9d286315..3a145da3af 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -36,7 +36,7 @@ install: - "python -c \"import sys; print(sys.executable)\"" # Actually install SAM CLI's dependencies - - "pip install -e '.[dev]'" + - "pip install -e \".[dev]\"" test_script: - "pytest --cov samcli --cov-report term-missing --cov-fail-under 95 tests\\unit" From 38fc332b410bfeeccc32f12ba39113d641fb8a0e Mon Sep 17 00:00:00 2001 From: Sanath Kumar Ramesh Date: Mon, 3 Jun 2019 16:07:18 -0700 Subject: [PATCH 7/7] turning off build --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 3a145da3af..18e6af57e5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,6 @@ version: 1.0.{build} image: Visual Studio 2017 +build: off environment: AWS_DEFAULT_REGION: us-east-1