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

chore: move arm64 build tests into its own file & worker #6004

Merged
merged 29 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
64d12bb
chore: move x86 tests into separate file
mndeveci Sep 26, 2023
279736c
disable re-runs
mndeveci Sep 26, 2023
2ae8fe5
update appveyor defs
mndeveci Sep 27, 2023
5ebaeb9
update arm64 tests for not exending from x86 ones
mndeveci Sep 27, 2023
4d86347
add arm64 specific ruby function & gemfile
mndeveci Sep 27, 2023
549d58f
use aws libraries for testing
mndeveci Sep 27, 2023
bfb7568
use correct code uri with different ruby versions
mndeveci Sep 27, 2023
2254a74
remove flaky configs for individual tests
mndeveci Sep 28, 2023
18a2184
set rerun configs fot appveyor
mndeveci Sep 28, 2023
2ae573e
remove redundant prints
mndeveci Sep 29, 2023
34000de
use more lightweight ruby library
mndeveci Sep 29, 2023
e67f1ee
split rust tests
mndeveci Sep 29, 2023
57562cc
use ruby3.2
mndeveci Sep 29, 2023
eba5b42
move rust parameterized class to base one
mndeveci Sep 29, 2023
db2af12
move rust class parameters to its own method
mndeveci Sep 29, 2023
c04d09a
fix codeuri for ruby x86 tests
mndeveci Sep 29, 2023
3e5e863
Merge branch 'develop' into move_arm64_build_tests
mndeveci Sep 29, 2023
aa729f0
revert appveyor changes during tests
mndeveci Sep 29, 2023
5b2d76b
fix indentation
mndeveci Sep 29, 2023
5cbe949
apply changes to binary testing configurations
mndeveci Sep 29, 2023
51f2465
add tmp folder for qol and remove arm64 parameterization
mndeveci Oct 3, 2023
7ce5bf7
fix import
mndeveci Oct 3, 2023
e09322d
formatting
mndeveci Oct 3, 2023
3580983
run build tests in parallel on CI
mndeveci Oct 3, 2023
03cee39
update names of the jobs
mndeveci Oct 3, 2023
315f249
do not run rust related stuff on windows
mndeveci Oct 3, 2023
4b0876a
fix formatting
mndeveci Oct 3, 2023
1250c47
Merge branch 'develop' into move_arm64_build_tests
mndeveci Oct 3, 2023
be08e6f
Merge branch 'develop' into move_arm64_build_tests
mndeveci Oct 3, 2023
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
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
13 changes: 11 additions & 2 deletions appveyor-linux-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ image:

configuration:
- BuildIntegTesting
- BuildIntegTestingArm64
- AllTerraformBuildTesting
- DeployIntegTesting
- PackageIntegTesting
Expand Down Expand Up @@ -47,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 @@ -169,12 +170,20 @@ 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"
mildaniel marked this conversation as resolved.
Show resolved Hide resolved

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

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

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

# Integ testing Terraform build
-
matrix:
Expand Down
14 changes: 12 additions & 2 deletions appveyor-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ image:

configuration:
- BuildIntegTesting
- BuildIntegTestingArm64
- AllTerraformBuildTesting
- DeployIntegTesting
- PackageIntegTesting
Expand Down Expand Up @@ -47,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 @@ -157,11 +158,20 @@ 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"

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

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

# Integ testing Terraform build
-
Expand Down
13 changes: 11 additions & 2 deletions appveyor-windows-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ clone_folder: C:\source

configuration:
- BuildIntegTesting
- BuildIntegTestingArm64
- AllTerraformBuildTesting
- DeployIntegTesting
- PackageIntegTesting
Expand Down Expand Up @@ -66,7 +67,7 @@ install:

# Make sure the temp directory exists for Python to use.
- ps: "mkdir -Force C:\\tmp"
- 'set PATH=%PYTHON_HOME%;C:\Ruby27-x64\bin;%PATH%;C:\Python37-x64;C:\Python39-x64;C:\Python310-x64;C:\Python311-x64'
- 'set PATH=%PYTHON_HOME%;C:\Ruby32-x64\bin;%PATH%;C:\Python37-x64;C:\Python39-x64;C:\Python310-x64;C:\Python311-x64'
- "echo %PYTHON_HOME%"
- "echo %PATH%"
- "python --version"
Expand Down Expand Up @@ -197,7 +198,15 @@ for:
- cargo lambda -V

test_script:
- ps: "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"
- ps: "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"

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

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"

#Integ testing Terraform build
- matrix:
Expand Down
16 changes: 13 additions & 3 deletions appveyor-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ clone_folder: C:\source

configuration:
- BuildIntegTesting
- BuildIntegTestingArm64
- AllTerraformBuildTesting
- DeployIntegTesting
- PackageIntegTesting
Expand Down Expand Up @@ -65,7 +66,7 @@ install:

# Make sure the temp directory exists for Python to use.
- ps: "mkdir -Force C:\\tmp"
- 'set PATH=%PYTHON_HOME%;C:\Ruby27-x64\bin;%PATH%;C:\Python37-x64;C:\Python39-x64;C:\Python310-x64;C:\Python311-x64'
- 'set PATH=%PYTHON_HOME%;C:\Ruby32-x64\bin;%PATH%;C:\Python37-x64;C:\Python39-x64;C:\Python310-x64;C:\Python311-x64'
- "echo %PYTHON_HOME%"
- "echo %PATH%"
- "python --version"
Expand Down Expand Up @@ -165,7 +166,7 @@ on_finish:


for:
#Integ testing build, regression
#Integ testing build
- matrix:
only:
- configuration: BuildIntegTesting
Expand All @@ -188,7 +189,16 @@ for:
- cargo lambda -V

test_script:
- ps: "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"
- ps: "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"

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

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"


#Integ testing Terraform build
- matrix:
Expand Down
Loading
Loading