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: Group integ tests based on arch and add makefile commands for them #132

Merged
merged 32 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
493b3eb
Create make commands for single arch
hnnasit Dec 14, 2023
71f4630
py311 tests group based on arch
hnnasit Dec 14, 2023
006ab0e
Update Makefile
hnnasit Dec 14, 2023
5428d3a
Update requirements.txt
hnnasit Dec 14, 2023
abb787b
Update Makefile
hnnasit Dec 14, 2023
423925c
Update test_build_images.py
hnnasit Dec 14, 2023
d8bc9d1
Update test_build_images.py
hnnasit Dec 14, 2023
39730f5
Update requirements.txt
hnnasit Dec 14, 2023
274e915
Update test_build_images.py
hnnasit Dec 14, 2023
e6d5e93
Update test_build_images.py
hnnasit Dec 14, 2023
b7249e3
Merge branch 'parallel-images' into develop
hnnasit Feb 2, 2024
560af4e
Merge pull request #1 from hnnasit/develop
hnnasit Feb 2, 2024
2d539f5
Update Makefile
hnnasit Feb 2, 2024
618c8df
Update Makefile
hnnasit Feb 3, 2024
7f0af1b
Update Makefile
hnnasit Feb 3, 2024
6bbfa56
Update Makefile
hnnasit Feb 3, 2024
c0b9e03
Update Makefile
hnnasit Feb 3, 2024
162e146
Update Makefile
hnnasit Feb 3, 2024
3e0ec64
Update Makefile
hnnasit Feb 3, 2024
89de0da
Update test_build_images.py
hnnasit Feb 14, 2024
56fb110
Update Makefile
hnnasit Feb 14, 2024
c67ea34
Update Makefile
hnnasit Feb 14, 2024
38dc0ab
Update Makefile
hnnasit Feb 15, 2024
a4174d9
Update GH actions to run integ tests
hnnasit Feb 15, 2024
9cd6485
Update single arch integ tests
hnnasit Feb 15, 2024
067055a
update single arch integ tests marker
hnnasit Feb 15, 2024
8b256fe
Checks for single arch images
hnnasit Feb 15, 2024
6dc2764
Merge branch 'develop' into parallel-images
hnnasit Feb 15, 2024
5489f65
Add dummy test for dotne8 arm64
hnnasit Feb 15, 2024
045fba2
Re-enable condition for running build GH actions
hnnasit Feb 15, 2024
762d27a
Update integ test markers to be consistent with ARCH env variable
hnnasit Feb 16, 2024
e129fe0
Refactor Makefile test command
hnnasit Feb 16, 2024
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
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
use-installer: true
- run: make init
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} make build-single-arch
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} make test
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} ARCH=x86_64 make test

build-multi-arch:
strategy:
Expand Down Expand Up @@ -96,4 +96,5 @@ jobs:
use-installer: true
- run: make init
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} make build-multi-arch
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} make test
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} ARCH=x86_64 make test
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} ARCH=arm64 make test
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,22 @@ build-multi-arch: pre-build
docker run --privileged --rm tonistiigi/binfmt --install arm64
docker build -f build-image-src/Dockerfile-$(RUNTIME) -t amazon/aws-sam-cli-build-image-$(IS_$(RUNTIME)):arm64 --platform linux/arm64 --build-arg SAM_CLI_VERSION=$(SAM_CLI_VERSION) --build-arg AWS_CLI_ARCH=aarch64 --build-arg GO_ARCH=arm64 --build-arg IMAGE_ARCH=arm64 ./build-image-src

build-x86-64-arch: pre-build
ifeq ($(strip $(RUNTIME)), $(IS_java8)) || ($(strip $(RUNTIME)), $(IS_provided)) || ($(strip $(RUNTIME)), $(IS_go1x))
docker build -f build-image-src/Dockerfile-$(RUNTIME) -t amazon/aws-sam-cli-build-image-$(IS_$(RUNTIME)):x86_64 --build-arg SAM_CLI_VERSION=$(SAM_CLI_VERSION) ./build-image-src
else
docker build -f build-image-src/Dockerfile-$(RUNTIME) -t amazon/aws-sam-cli-build-image-$(IS_$(RUNTIME)):x86_64 --platform linux/amd64 --build-arg SAM_CLI_VERSION=$(SAM_CLI_VERSION) --build-arg AWS_CLI_ARCH=x86_64 --build-arg GO_ARCH=amd64 --build-arg IMAGE_ARCH=x86_64 ./build-image-src
endif

build-arm64-arch: pre-build
docker build -f build-image-src/Dockerfile-$(RUNTIME) -t amazon/aws-sam-cli-build-image-$(IS_$(RUNTIME)):arm64 --platform linux/arm64 --build-arg SAM_CLI_VERSION=$(SAM_CLI_VERSION) --build-arg AWS_CLI_ARCH=aarch64 --build-arg GO_ARCH=arm64 --build-arg IMAGE_ARCH=arm64 ./build-image-src

test: pre-build
pytest tests -vv -m $(RUNTIME)
ifeq ($(strip $(ARCH)), x86_64)
pytest tests -vv -m $(RUNTIME)X86_64
else ifeq ($(strip $(ARCH)), arm64)
pytest tests -vv -m $(RUNTIME)Arm64
endif

lint:
# Linter performs static analysis to catch latent bugs
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pylint~=2.6.0
urllib3<2

# Test requirements
pytest==6.1.1
pytest==7.3.1

# formatter
black==20.8b1
Loading