Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "release: 0.20.0" #1351

Merged
merged 1 commit into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Enable container based builds
sudo: required
language: python
dist: xenial

services:
- docker

python:
- "2.7"
- "3.6"
- "3.7"
- "3.8-dev"

matrix:
allow_failures:
- python: 3.8-dev

addons:
apt:
packages:
# Xenial images don't have jdk8 installed by default.
- openjdk-8-jdk

before_install:
# Use the JDK8 that we installed
- JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
- PATH=$JAVA_HOME/bin:$PATH

- nvm install 8.10
- npm --version
- node --version
# Install .NET Core 2.1
- export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 DOTNET_CLI_TELEMETRY_OPTOUT=1
- if [ "$LINUX" ]; then sudo apt install libunwind8; fi
- wget https://dot.net/v1/dotnet-install.sh -O /tmp/dotnet-install.sh
- chmod +x /tmp/dotnet-install.sh
- /tmp/dotnet-install.sh -v 2.1.504
- export DOTNET_ROOT=/home/travis/.dotnet
- export PATH=/home/travis/.dotnet:/home/travis/.dotnet/tools:$PATH
- dotnet --info

install:
# Install the code requirements
- make init

script:
# Runs unit tests
- make pr
- SAM_CLI_DEV=1 travis_wait pytest -vv tests/integration
33 changes: 0 additions & 33 deletions DEVELOPMENT_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,39 +154,6 @@ conventions are best practices that we have learnt over time.
- Do not catch the broader `Exception`, unless you have a really
strong reason to do. You must explain the reason in great detail in
comments.


Testing
-------

We need thorough test coverage to ensure the code change works today,
and continues to work in future. When you make a code change, use the
following framework to decide the kinds of tests to write:

- When you adds/removed/modifies code paths (aka branches/arcs),
write **unit tests** with goal of making sure the flow works. Focus
on verifying the flow and use mocks to isolate from as many
external dependencies as you can. "External dependencies"
includes system calls, libraries, other classes/methods you wrote
but logically outside of the system-under-test.

> Aim to test with complete isolation

- When your code uses external dependencies, write **functional tests**
to verify some flows by including as many external dependencies as
possible. Focus on verifying the flows that directly use the dependencies.

> Aim to test one or more logically related components. Includes docker,
file system, API server, but might still mock some things like AWS API
calls.

- When your code adds/removes/modifies a customer facing behavior,
write **integration tests**. Focus on verifying the customer experience
works as expected.

> Aim to test how a customer will use the feature/command. Includes
calling AWS APIs, spinning up Docker containers, mutating files etc.


Design Document
---------------
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
69 changes: 24 additions & 45 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,48 @@
version: 1.0.{build}
image:
- Ubuntu
- Visual Studio 2017
image: Visual Studio 2017
build: off

environment:
AWS_DEFAULT_REGION: us-east-1
SAM_CLI_DEV: 1

matrix:

- PYTHON_HOME: "C:\\Python27-x64"
PYTHON_VERSION: '2.7.16'
PYTHON_VERSION: '2.7'
PYTHON_ARCH: '32'

- PYTHON_HOME: "C:\\Python36-x64"
PYTHON_VERSION: '3.6.8'
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.4'
PYTHON_VERSION: '3.7'
PYTHON_ARCH: '64'

for:
-
matrix:
only:
- image: Visual Studio 2017

install:
# 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"

-
matrix:
only:
- image: Ubuntu
install:
- sh: "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64"
- sh: "PATH=$JAVA_HOME/bin:$PATH"
- sh: "source ${HOME}/venv${PYTHON_VERSION}/bin/activate"
- sh: "rvm use 2.5"
install:

# Install latest gradle
- sh: "sudo apt-get -y remove gradle"
- sh: "wget https://services.gradle.org/distributions/gradle-5.5-bin.zip -P /tmp"
- sh: "sudo unzip -d /opt/gradle /tmp/gradle-*.zip"
- sh: "PATH=/opt/gradle/gradle-5.5/bin:$PATH"
# Upgrade setuptools, wheel and virtualenv
- "python -m pip install --upgrade setuptools wheel virtualenv"

build_script:
- "python -c \"import sys; print(sys.executable)\""
# 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]\""
# 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"
- "pytest --cov samcli --cov-report term-missing --cov-fail-under 95 tests\\unit"
- "flake8 samcli"
- "flake8 tests/unit tests/integration"
- "flake8 tests\\unit tests\\integration"
- "pylint --rcfile .pylintrc samcli"

# Runs only in Linux
- sh: "pytest -vv tests/integration"

Loading