diff --git a/.circleci/config.yml b/.circleci/config.yml index ddf67fae..b936a177 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -272,12 +272,44 @@ jobs: - checkout - check-if-tests-needed - pip-install-deps: - requirements: "tests/requirements.txt" + requirements: "tests/requirements-aws.txt" - run-tests-with-coverage-report: tests: "tests_aws" - store-pytest-results - store-coverage-report + py312autowrapt: + docker: + - image: public.ecr.aws/docker/library/python:3.12 + environment: + AUTOWRAPT_BOOTSTRAP: instana + working_directory: ~/repo + steps: + - checkout + - check-if-tests-needed + - pip-install-deps: + requirements: "tests/requirements-minimal.txt" + - run-tests-with-coverage-report: + tests: "tests_autowrapt" + - store-pytest-results + - store-coverage-report + + py313autowrapt: + docker: + - image: public.ecr.aws/docker/library/python:3.13 + environment: + AUTOWRAPT_BOOTSTRAP: instana + working_directory: ~/repo + steps: + - checkout + - check-if-tests-needed + - pip-install-deps: + requirements: "tests/requirements-minimal.txt" + - run-tests-with-coverage-report: + tests: "tests_autowrapt" + - store-pytest-results + - store-coverage-report + python313: docker: - image: public.ecr.aws/docker/library/python:3.13 @@ -423,6 +455,8 @@ workflows: - py39gevent_starlette - py312aws - py312kafka + - py312autowrapt + - py313autowrapt - final_job: requires: - python38 @@ -436,3 +470,5 @@ workflows: - py39cassandra - py39gevent_starlette - py312aws + - py312autowrapt + - py313autowrapt diff --git a/pytest.ini b/pytest.ini index e79dc7de..64b91610 100644 --- a/pytest.ini +++ b/pytest.ini @@ -7,5 +7,6 @@ pythonpath = src testpaths = tests tests_aws + tests_autowrapt markers = original: mark test to use the original method instead of the mocked ones under `conftest.py` diff --git a/tests/requirements-aws.txt b/tests/requirements-aws.txt new file mode 100644 index 00000000..49b58f29 --- /dev/null +++ b/tests/requirements-aws.txt @@ -0,0 +1,2 @@ +-r requirements-minimal.txt +boto3 diff --git a/tests/requirements-minimal.txt b/tests/requirements-minimal.txt new file mode 100644 index 00000000..a325691b --- /dev/null +++ b/tests/requirements-minimal.txt @@ -0,0 +1,3 @@ +coverage>=5.5 +pytest>=4.6 +setuptools diff --git a/tests_autowrapt/test_autowrapt.py b/tests_autowrapt/test_autowrapt.py new file mode 100644 index 00000000..61496d1f --- /dev/null +++ b/tests_autowrapt/test_autowrapt.py @@ -0,0 +1,6 @@ +import os +import sys + +def test_autowrapt_bootstrap(): + assert os.environ.get("AUTOWRAPT_BOOTSTRAP") == "instana" + assert "instana" in sys.modules