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

refactor test cases #119

Merged
merged 5 commits into from
Apr 19, 2024
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
38 changes: 33 additions & 5 deletions .github/workflows/integ-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,44 @@ on:
- develop

jobs:
integ-tests:
go-tests:
runs-on: ubuntu-latest
environment:
name: prod
name: integ-tests
steps:
- uses: actions/checkout@v4
- name: run go tests
run: make tests-with-docker
integ-tests-x86:
runs-on: ubuntu-latest
environment:
name: integ-tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: run integration tests
run: make integ-tests-with-docker-x86-64
integ-tests-arm64:
runs-on: ubuntu-latest
environment:
name: integ-tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: run integration tests
run: make integ-tests-with-docker-arm64
integ-tests-old:
runs-on: ubuntu-latest
environment:
name: integ-tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: allows us to build arm64 images
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: run integration tests
run: make integ-tests-with-docker
run: make integ-tests-with-docker-old
30 changes: 28 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,35 @@ integ-tests-and-compile: tests
integ-tests-with-docker: tests-with-docker
make compile-with-docker-all
make integ-tests
integ-tests:

prep-python:
python3 -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install requests parameterized

exec-python-e2e-test:
.venv/bin/python3 test/integration/local_lambda/test_end_to_end.py

integ-tests:
make prep-python
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
make TEST_ARCH=x86_64 TEST_PORT=8002 exec-python-e2e-test
make TEST_ARCH=arm64 TEST_PORT=9002 exec-python-e2e-test
make TEST_ARCH="" TEST_PORT=9052 exec-python-e2e-test

integ-tests-with-docker-x86-64:
make ARCH=x86_64 compile-with-docker
make prep-python
make TEST_ARCH=x86_64 TEST_PORT=8002 exec-python-e2e-test

integ-tests-with-docker-arm64:
make ARCH=arm64 compile-with-docker
make prep-python
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
make TEST_ARCH=arm64 TEST_PORT=9002 exec-python-e2e-test

integ-tests-with-docker-old:
make ARCH=old compile-with-docker
make prep-python
make TEST_ARCH="" TEST_PORT=9052 exec-python-e2e-test

Loading