Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/pip/requirements/develop/pydan…
Browse files Browse the repository at this point in the history
…tic-core-2.10.0
  • Loading branch information
hawflau authored Oct 4, 2023
2 parents ebdcf65 + aa35c0a commit 5d719db
Show file tree
Hide file tree
Showing 111 changed files with 8,171 additions and 1,403 deletions.
49 changes: 21 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,15 @@ jobs:
shell: bash
integration-tests:
name: Integration Tests / ${{ matrix.os }} / ${{ matrix.python }} / ${{ matrix.tests_folder }}
name: Integ / ${{ matrix.os }} / ${{ matrix.python }} / ${{ matrix.tests_config }}
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
env:
AWS_DEFAULT_REGION: us-east-1
SAM_CLI_DEV: "1"
CARGO_LAMBDA_VERSION: 0.17.1
CARGO_INCREMENTAL: 0 # disable incremental compilation
CARGO_TERM_COLOR: always # enable colors in Cargo output
CI: true
defaults:
run:
Expand All @@ -110,24 +112,24 @@ jobs:
- "3.8"
- "3.9"
# folders that is commented below requires credentials, no need to spare time to run them
tests_folder:
- "buildcmd"
tests_config:
- "-n 2 --reruns 3 tests/integration/buildcmd"
#- "delete"
#- "deploy"
- "init"
- "tests/integration/init"
#- "list"
- "local"
- "tests/integration/local"
#- "logs"
#- "package"
- "pipeline"
- "tests/integration/pipeline"
#- "publish"
- "root"
- "scripts"
- "tests/integration/root"
- "tests/integration/scripts"
#- "sync"
- "telemetry"
- "tests/integration/telemetry"
#- "traces"
#- "validate"
- "docs"
- "tests/integration/docs"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
Expand Down Expand Up @@ -156,33 +158,24 @@ jobs:
with:
distribution: 'corretto'
java-version: '17'
# Install and configure Rust
- name: Install rustup
# Install and configure Rust & Cargo Lambda
- name: Install and configure Rust & Cargo Lambda
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
: install rustup if needed
if ! command -v rustup &> /dev/null ; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
fi
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: rustup toolchain install stable
run: rustup toolchain install stable --profile minimal --no-self-update
- run: rustup default stable
- run: |
: disable incremental compilation
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
- run: |
: enable colors in Cargo output
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
# Install and configure Cargo Lambda
- name: Install Cargo Lambda
run: pip install cargo-lambda==$CARGO_LAMBDA_VERSION
- run: echo "$HOME/.local/bin" >> $GITHUB_PATH
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
pip install cargo-lambda==$CARGO_LAMBDA_VERSION
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Init samdev
run: make init
- name: Run integration tests for ${{ matrix.tests_folder }}
run: pytest -vv tests/integration/${{ matrix.tests_folder }}
- name: Run integration tests for ${{ matrix.tests_config }}
run: pytest -vv ${{ matrix.tests_config }}

smoke-and-functional-tests:
name: Functional & Smoke Tests / ${{ matrix.os }} / ${{ matrix.python }}
Expand Down
84 changes: 11 additions & 73 deletions appveyor-linux-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ image:

configuration:
- BuildIntegTesting
- LocalZipTerraformBuildIntegTesting
- LocalZipTerraformBuildInContainerIntegTesting
- S3ZipTerraformBuildIntegTesting
- S3ZipTerraformBuildInContainerIntegTesting
- OtherTerraformBuildIntegTesting
- BuildIntegTestingArm64
- AllTerraformBuildTesting
- DeployIntegTesting
- PackageIntegTesting
- DeleteIntegTesting
Expand Down Expand Up @@ -51,7 +48,7 @@ install:
- sh: "mvn --version"

- sh: "source ${HOME}/venv${PYTHON_VERSION}/bin/activate"
- sh: "rvm use 2.7.2"
- sh: "rvm use 3.2.2"
- sh: "docker info"
- sh: "docker version"
- sh: "nvm install ${NODE_VERSION}"
Expand Down Expand Up @@ -173,85 +170,25 @@ for:
- configuration: BuildIntegTesting

test_script:
- sh: "pytest -vv tests/integration/buildcmd --ignore=tests/integration/buildcmd/test_build_terraform_applications.py --ignore=tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"
- sh: "pytest -vv -n 2 --reruns 3 tests/integration/buildcmd --ignore=tests/integration/buildcmd/test_build_cmd_arm64.py --ignore=tests/integration/buildcmd/test_build_terraform_applications.py --ignore=tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Set JAVA_HOME to java11
- sh: "JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64"
- sh: "pytest -vv tests/integration/buildcmd/test_build_cmd.py -k test_building_java11_in_process --json-report --json-report-file=TEST_REPORT-integration-buildcmd-java11.json"

# Local ZIP Terraform Build integ testing
-
matrix:
only:
- configuration: LocalZipTerraformBuildIntegTesting

test_script:
# install Terraform
- sh: "sudo apt update --allow-releaseinfo-change"
- sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`"
- sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp"
- sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip"
- sh: "sudo mv /opt/terraform/terraform /usr/local/bin/"
- sh: "terraform -version"

- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Local ZIP Terraform Build In Container integ testing
-
matrix:
only:
- configuration: LocalZipTerraformBuildInContainerIntegTesting

test_script:
# install Terraform
- sh: "sudo apt update --allow-releaseinfo-change"
- sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`"
- sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp"
- sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip"
- sh: "sudo mv /opt/terraform/terraform /usr/local/bin/"
- sh: "terraform -version"

- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# S3 ZIP Terraform Build integ testing
-
matrix:
only:
- configuration: S3ZipTerraformBuildIntegTesting

test_script:
# install Terraform
- sh: "sudo apt update --allow-releaseinfo-change"
- sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`"
- sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp"
- sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip"
- sh: "sudo mv /opt/terraform/terraform /usr/local/bin/"
- sh: "terraform -version"

- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# S3 ZIP Terraform Build In Container integ testing
-
matrix:
# Integ testing build arm64 functions
- matrix:
only:
- configuration: S3ZipTerraformBuildInContainerIntegTesting
- configuration: BuildIntegTestingArm64

test_script:
# install Terraform
- sh: "sudo apt update --allow-releaseinfo-change"
- sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`"
- sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp"
- sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip"
- sh: "sudo mv /opt/terraform/terraform /usr/local/bin/"
- sh: "terraform -version"

- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"
- sh: "pytest -vv --reruns 3 tests/integration/buildcmd/test_build_cmd_arm64.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd-arm64.json"

# Other Terraform Build In Container integ testing
# Integ testing Terraform build
-
matrix:
only:
- configuration: OtherTerraformBuildIntegTesting
- configuration: AllTerraformBuildTesting

test_script:
# install Terraform
Expand All @@ -262,6 +199,7 @@ for:
- sh: "sudo mv /opt/terraform/terraform /usr/local/bin/"
- sh: "terraform -version"

- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"
- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Integ testing deploy
Expand Down
85 changes: 12 additions & 73 deletions appveyor-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ image:

configuration:
- BuildIntegTesting
- LocalZipTerraformBuildIntegTesting
- LocalZipTerraformBuildInContainerIntegTesting
- S3ZipTerraformBuildIntegTesting
- S3ZipTerraformBuildInContainerIntegTesting
- OtherTerraformBuildIntegTesting
- BuildIntegTestingArm64
- AllTerraformBuildTesting
- DeployIntegTesting
- PackageIntegTesting
- DeleteIntegTesting
Expand Down Expand Up @@ -51,7 +48,7 @@ install:
- sh: "mvn --version"

- sh: "source ${HOME}/venv${PYTHON_VERSION}/bin/activate"
- sh: "rvm use 2.7.2"
- sh: "rvm use 3.2.2"
- sh: "docker info"
- sh: "docker version"
- sh: "nvm install ${NODE_VERSION}"
Expand Down Expand Up @@ -161,85 +158,26 @@ for:
- configuration: BuildIntegTesting

test_script:
- sh: "pytest -vv tests/integration/buildcmd --ignore=tests/integration/buildcmd/test_build_terraform_applications.py --ignore=tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"
- sh: "pytest -vv -n 2 --reruns 3 tests/integration/buildcmd --ignore=tests/integration/buildcmd/test_build_cmd_arm64.py --ignore=tests/integration/buildcmd/test_build_terraform_applications.py --ignore=tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Set JAVA_HOME to java11
- sh: "JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64"
- sh: "pytest -vv tests/integration/buildcmd/test_build_cmd.py -k test_building_java11_in_process --json-report --json-report-file=TEST_REPORT-integration-buildcmd-java11.json"

# Local ZIP Terraform Build integ testing
-
matrix:
only:
- configuration: LocalZipTerraformBuildIntegTesting

test_script:
# install Terraform
- sh: "sudo apt update --allow-releaseinfo-change"
- sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`"
- sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp"
- sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip"
- sh: "sudo mv /opt/terraform/terraform /usr/local/bin/"
- sh: "terraform -version"

- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Local ZIP Terraform Build In Container integ testing
-
matrix:
only:
- configuration: LocalZipTerraformBuildInContainerIntegTesting

test_script:
# install Terraform
- sh: "sudo apt update --allow-releaseinfo-change"
- sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`"
- sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp"
- sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip"
- sh: "sudo mv /opt/terraform/terraform /usr/local/bin/"
- sh: "terraform -version"

- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# S3 ZIP Terraform Build integ testing
-
matrix:
only:
- configuration: S3ZipTerraformBuildIntegTesting

test_script:
# install Terraform
- sh: "sudo apt update --allow-releaseinfo-change"
- sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`"
- sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp"
- sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip"
- sh: "sudo mv /opt/terraform/terraform /usr/local/bin/"
- sh: "terraform -version"

- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# S3 ZIP Terraform Build In Container integ testing
-

# Integ testing build arm64 functions
-
matrix:
only:
- configuration: S3ZipTerraformBuildInContainerIntegTesting
- configuration: BuildIntegTestingArm64

test_script:
# install Terraform
- sh: "sudo apt update --allow-releaseinfo-change"
- sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`"
- sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp"
- sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip"
- sh: "sudo mv /opt/terraform/terraform /usr/local/bin/"
- sh: "terraform -version"

- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"
- sh: "pytest -vv --reruns 3 tests/integration/buildcmd/test_build_cmd_arm64.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd-arm64.json"

# Other Terraform Build In Container integ testing
# Integ testing Terraform build
-
matrix:
only:
- configuration: OtherTerraformBuildIntegTesting
- configuration: AllTerraformBuildTesting

test_script:
# install Terraform
Expand All @@ -250,6 +188,7 @@ for:
- sh: "sudo mv /opt/terraform/terraform /usr/local/bin/"
- sh: "terraform -version"

- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"
- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Integ testing deploy
Expand Down
Loading

0 comments on commit 5d719db

Please sign in to comment.