Skip to content

Commit

Permalink
Merge branch 'develop' into feat/build-in-source
Browse files Browse the repository at this point in the history
  • Loading branch information
lucashuy authored Oct 24, 2023
2 parents 9c9ea15 + a426f9c commit 4169644
Show file tree
Hide file tree
Showing 23 changed files with 809 additions and 533 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/setup-java@v3
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/update-reproducibles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ on:
pull_request:
branches: [develop]
paths:
- requirements/base.txt # run this GHA only if requirements file is changed
# run this GHA if the following files have changed
- requirements/base.txt
- requirements/reproducible-linux.txt
- requirements/reproducible-mac.txt
- requirements/reproducible-win.txt

jobs:
update-reqs:
Expand Down
56 changes: 22 additions & 34 deletions appveyor-linux-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ configuration:
- BuildIntegTestingArm64
- BuildIntegTestingArm64Java
- AllTerraformBuildTesting
- DeployIntegTesting
- PackageIntegTesting
- DeleteIntegTesting
- PackageAndDeleteAndDeployIntegTesting
- SyncIntegTesting
- LocalIntegTesting
- EndToEndTesting
- LocalInvokeIntegTesting
- LocalStartIntegTesting
# other Integration testing, Dev, regression and smoke testing
- OtherTesting
- OtherAndEndToEndTesting

environment:
PYTHON_HOME: "$HOME/venv3.11/bin"
Expand Down Expand Up @@ -214,32 +212,14 @@ for:
- 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
# Integ testing package & delete
-
matrix:
only:
- configuration: DeployIntegTesting
- configuration: PackageAndDeleteAndDeployIntegTesting

test_script:
- sh: "pytest -vv tests/integration/deploy -n 4 --reruns 4 --dist=loadgroup --json-report --json-report-file=TEST_REPORT-integration-deploy.json"

# Integ testing package
-
matrix:
only:
- configuration: PackageIntegTesting

test_script:
- sh: "pytest -vv tests/integration/package -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-package.json"

# Integ testing delete
-
matrix:
only:
- configuration: DeleteIntegTesting

test_script:
- sh: "pytest -vv tests/integration/delete -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-delete.json"
- sh: "pytest -vv tests/integration/package tests/integration/delete tests/integration/deploy --dist=loadgroup -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-package-delete-deploy.json"

# Integ testing sync
-
Expand All @@ -254,7 +234,7 @@ for:
-
matrix:
only:
- configuration: LocalIntegTesting
- configuration: LocalInvokeIntegTesting

test_script:
# install Terraform
Expand All @@ -265,23 +245,31 @@ for:
- sh: "sudo mv /opt/terraform/terraform /usr/local/bin/"
- sh: "terraform -version"

- sh: "pytest -vv tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-local.json"
- sh: "pytest -vv tests/integration/local/invoke tests/integration/local/generate_event --json-report --json-report-file=TEST_REPORT-integration-local.json"

# End-to-end testing
# Integ testing local
-
matrix:
only:
- configuration: EndToEndTesting
- configuration: LocalStartIntegTesting

test_script:
- sh: "pytest -vv -n 4 --reruns 5 --dist loadscope tests/end_to_end --json-report --json-report-file=TEST_REPORT-end-to-end.json"
# 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 tests/integration/local/start_api tests/integration/local/start_lambda --json-report --json-report-file=TEST_REPORT-integration-local-start.json"

# Other testing
-
matrix:
only:
- configuration: OtherTesting
- configuration: OtherAndEndToEndTesting

test_script:
- sh: "pytest -vv -n 4 --reruns 4 --dist loadgroup tests/integration --ignore=tests/integration/buildcmd --ignore=tests/integration/delete --ignore=tests/integration/deploy --ignore=tests/integration/package --ignore=tests/integration/sync --ignore=tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-others.json"
- sh: "pytest -vv -n 4 --reruns 4 --dist loadgroup tests/integration tests/end_to_end --ignore=tests/integration/buildcmd --ignore=tests/integration/delete --ignore=tests/integration/deploy --ignore=tests/integration/package --ignore=tests/integration/sync --ignore=tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-others.json"
- sh: "pytest -vv tests/regression --json-report --json-report-file=TEST_REPORT-regression.json"
44 changes: 21 additions & 23 deletions appveyor-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ configuration:
- BuildIntegTestingArm64
- BuildIntegTestingArm64Java
- AllTerraformBuildTesting
- DeployIntegTesting
- PackageAndDeleteIntegTesting
- PackageAndDeleteAndDeployIntegTesting
- SyncIntegTesting
- LocalIntegTesting
- EndToEndTesting
- LocalInvokeIntegTesting
- LocalStartIntegTesting
# other Integration testing, Dev, regression and smoke testing
- OtherTesting
- OtherAndEndToEndTesting

environment:
PYTHON_HOME: "$HOME/venv3.8/bin"
Expand Down Expand Up @@ -202,23 +201,14 @@ for:
- 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
-
matrix:
only:
- configuration: DeployIntegTesting

test_script:
- sh: "pytest -vv tests/integration/deploy -n 4 --reruns 4 --dist=loadgroup --json-report --json-report-file=TEST_REPORT-integration-deploy.json"

# Integ testing package & delete
-
matrix:
only:
- configuration: PackageAndDeleteIntegTesting
- configuration: PackageAndDeleteAndDeployIntegTesting

test_script:
- sh: "pytest -vv tests/integration/package tests/integration/delete -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-package-delete.json"
- sh: "pytest -vv tests/integration/package tests/integration/delete tests/integration/deploy --dist=loadgroup -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-package-delete-deploy.json"

# Integ testing sync
-
Expand All @@ -233,7 +223,7 @@ for:
-
matrix:
only:
- configuration: LocalIntegTesting
- configuration: LocalInvokeIntegTesting

test_script:
# install Terraform
Expand All @@ -244,23 +234,31 @@ for:
- sh: "sudo mv /opt/terraform/terraform /usr/local/bin/"
- sh: "terraform -version"

- sh: "pytest -vv tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-local.json"
- sh: "pytest -vv tests/integration/local/invoke tests/integration/local/generate_event --json-report --json-report-file=TEST_REPORT-integration-local.json"

# End-to-end testing
# Integ testing local
-
matrix:
only:
- configuration: EndToEndTesting
- configuration: LocalStartIntegTesting

test_script:
- sh: "pytest -vv -n 4 --reruns 5 --dist loadscope tests/end_to_end --json-report --json-report-file=TEST_REPORT-end-to-end.json"
# 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 tests/integration/local/start_api tests/integration/local/start_lambda --json-report --json-report-file=TEST_REPORT-integration-local-start.json"

# Other testing
-
matrix:
only:
- configuration: OtherTesting
- configuration: OtherAndEndToEndTesting

test_script:
- sh: "pytest -vv -n 4 --reruns 4 --dist loadgroup tests/integration --ignore=tests/integration/buildcmd --ignore=tests/integration/delete --ignore=tests/integration/deploy --ignore=tests/integration/package --ignore=tests/integration/sync --ignore=tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-others.json"
- sh: "pytest -vv -n 4 --reruns 4 --dist loadgroup tests/integration tests/end_to_end --ignore=tests/integration/buildcmd --ignore=tests/integration/delete --ignore=tests/integration/deploy --ignore=tests/integration/package --ignore=tests/integration/sync --ignore=tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-others.json"
- sh: "pytest -vv tests/regression --json-report --json-report-file=TEST_REPORT-regression.json"
76 changes: 46 additions & 30 deletions appveyor-windows-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ configuration:
- BuildIntegTestingJavaPythonProvided
- BuildIntegTestingArm64
- AllTerraformBuildTesting
- DeployIntegTesting
- PackageIntegTesting
- DeleteIntegTesting
- PackageAndDeleteAndDeployIntegTesting
- SyncIntegTesting
- LocalIntegTesting
- EndToEndTesting
- LocalInvokeIntegTesting
- LocalStartApiIntegTesting
- LocalStartLambdaIntegTesting
# other Integration testing, Dev, regression and smoke testing
- OtherTesting
- OtherAndEndToEndTesting

environment:
AWS_DEFAULT_REGION: us-east-1
Expand Down Expand Up @@ -213,6 +212,23 @@ for:
only:
- configuration: BuildIntegTestingArm64

build_script:
# install Rust in build_script to not override the default "install" actions
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
- rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain stable
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- set RUST_BACKTRACE=1
- rustup toolchain install stable --profile minimal --no-self-update
- rustup default stable
- rustup target add x86_64-unknown-linux-gnu --toolchain stable
- rustup target add aarch64-unknown-linux-gnu --toolchain stable
- ps: "choco install zig"
- ps: Invoke-WebRequest -Uri https://github.com/cargo-lambda/cargo-lambda/releases/download/$env:CARGO_LAMBDA_VERSION/cargo-lambda-$env:CARGO_LAMBDA_VERSION.windows-x64.zip -OutFile C:\Users\appveyor\cargo-lambda.zip
- ps: Expand-Archive -DestinationPath C:\Users\appveyor\.cargo\bin C:\Users\appveyor\cargo-lambda.zip
- rustc -V
- cargo -V
- cargo lambda -V

test_script:
- ps: "pytest -vv --reruns 3 tests/integration/buildcmd/test_build_cmd_arm64.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd-arm64.json"

Expand All @@ -229,65 +245,65 @@ for:
- ps: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"
- ps: "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
# Integ testing package, delete and deploy
- matrix:
only:
- configuration: DeployIntegTesting
- configuration: PackageAndDeleteAndDeployIntegTesting

test_script:
- ps: "pytest -vv tests/integration/deploy -n 4 --reruns 4 --dist=loadgroup --json-report --json-report-file=TEST_REPORT-integration-deploy.json"
- ps: "pytest -vv tests/integration/package tests/integration/delete tests/integration/deploy --dist=loadgroup -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-package-delete.json"

# Integ testing package
# Integ testing sync
- matrix:
only:
- configuration: PackageIntegTesting
- configuration: SyncIntegTesting

test_script:
- ps: "pytest -vv tests/integration/package -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-package.json"
- ps: "pytest -vv tests/integration/sync -n 3 --reruns 3 --dist loadscope --json-report --json-report-file=TEST_REPORT-integration-sync.json"

# Integ testing delete
#Integ testing local invoke and generate event
- matrix:
only:
- configuration: DeleteIntegTesting
- configuration: LocalInvokeIntegTesting

test_script:
- ps: "pytest -vv tests/integration/delete -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-delete.json"

# Integ testing sync
- matrix:
only:
- configuration: SyncIntegTesting
# install Terraform CLI
- "choco install terraform"
- "terraform -version"

test_script:
- ps: "pytest -vv tests/integration/sync -n 3 --reruns 3 --dist loadscope --json-report --json-report-file=TEST_REPORT-integration-sync.json"
- ps: "pytest -vv tests/integration/local/invoke tests/integration/local/generate_event --json-report --json-report-file=TEST_REPORT-integration-local.json"

#Integ testing local
#Integ testing local start-api
- matrix:
only:
- configuration: LocalIntegTesting
- configuration: LocalStartApiIntegTesting

test_script:
# install Terraform CLI
- "choco install terraform"
- "terraform -version"

- ps: "pytest -vv tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-local.json"
- ps: "pytest -vv tests/integration/local/start_api --json-report --json-report-file=TEST_REPORT-integration-local-api.json"

# End-to-end testing
#Integ testing local start-lambda
- matrix:
only:
- configuration: EndToEndTesting
- configuration: LocalStartLambdaIntegTesting

test_script:
- ps: "pytest -vv -n 4 --reruns 5 --dist loadscope tests/end_to_end --json-report --json-report-file=TEST_REPORT-end-to-end.json"
# install Terraform CLI
- "choco install terraform"
- "terraform -version"

- ps: "pytest -vv tests/integration/local/start_lambda --json-report --json-report-file=TEST_REPORT-integration-local-lambda.json"

#Other testing
- matrix:
only:
- configuration: OtherTesting
- configuration: OtherAndEndToEndTesting

test_script:
- ps: "pytest -vv -n 4 --reruns 4 --dist loadgroup tests/integration --ignore=tests/integration/buildcmd --ignore=tests/integration/delete --ignore=tests/integration/deploy --ignore=tests/integration/package --ignore=tests/integration/sync --ignore=tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-others.json"
- ps: "pytest -vv -n 4 --reruns 4 --dist loadgroup tests/integration tests/end_to_end --ignore=tests/integration/buildcmd --ignore=tests/integration/delete --ignore=tests/integration/deploy --ignore=tests/integration/package --ignore=tests/integration/sync --ignore=tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-others.json"
- ps: "pytest -vv tests/regression --json-report --json-report-file=TEST_REPORT-regression.json"
# Uncomment for RDP
# on_finish:
Expand Down
Loading

0 comments on commit 4169644

Please sign in to comment.