Skip to content

Commit

Permalink
ci: added individual tests for google cloud packages due to conflicts…
Browse files Browse the repository at this point in the history
… for python 3.11 and 3.12

Signed-off-by: Cagri Yonca <cagriyonca@gmail.com>
  • Loading branch information
CagriYonca committed Aug 23, 2024
1 parent b6b3b31 commit 23a25f2
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 9 deletions.
56 changes: 47 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ commands:
run-tests-with-coverage-report:
parameters:
googlecloud:
default: ""
type: string
cassandra:
default: ""
type: string
Expand All @@ -57,6 +60,7 @@ commands:
CASSANDRA_TEST: "<<parameters.cassandra>>"
COUCHBASE_TEST: "<<parameters.couchbase>>"
GEVENT_STARLETTE_TEST: "<<parameters.gevent>>"
GOOGLE_CLOUD_TEST: "<<parameters.googlecloud>>"
command: |
. venv/bin/activate
coverage run --source=instana -m pytest -v --junitxml=test-results <<parameters.tests>>
Expand Down Expand Up @@ -210,6 +214,21 @@ jobs:
- store-pytest-results
- store-coverage-report

py311-googlecloud:
docker:
- image: cimg/python:3.11.4
- image: vanmoof/pubsub-emulator
working_directory: ~/repo
steps:
- checkout
- pip-install-deps:
requirements: "tests/requirements-google-cloud-storage.txt"
- run-tests-with-coverage-report:
googlecloud: "true"
tests: "tests/clients/test_google-cloud-*.py"
- store-pytest-results
- store-coverage-report

python312:
docker:
- image: cimg/python:3.12.0
Expand All @@ -235,6 +254,21 @@ jobs:
- store-pytest-results
- store-coverage-report

py312-googlecloud:
docker:
- image: cimg/python:3.12.0
- image: vanmoof/pubsub-emulator
working_directory: ~/repo
steps:
- checkout
- pip-install-deps:
requirements: "tests/requirements-google-cloud-storage.txt"
- run-tests-with-coverage-report:
googlecloud: "true"
tests: "tests/clients/test_google-cloud-*.py"
- store-pytest-results
- store-coverage-report

python313:
docker:
- image: python:3.13.0rc1-bookworm
Expand All @@ -260,7 +294,7 @@ jobs:
- store-pytest-results
- store-coverage-report

py39couchbase:
py39-couchbase:
docker:
- image: cimg/python:3.9.17
- image: couchbase/server-sandbox:5.5.0
Expand All @@ -276,7 +310,7 @@ jobs:
- store-pytest-results
- store-coverage-report

py39cassandra:
py39-cassandra:
docker:
- image: cimg/python:3.9.17
- image: cassandra:3.11
Expand Down Expand Up @@ -305,7 +339,7 @@ jobs:
- store-pytest-results
- run_sonarqube

py39gevent_starlette:
py39-gevent_starlette:
docker:
- image: cimg/python:3.9.17
working_directory: ~/repo
Expand All @@ -329,9 +363,11 @@ workflows:
- python311
- python312
- python313
- py39cassandra
- py39couchbase
- py39gevent_starlette
- py39-cassandra
- py39-couchbase
- py39-gevent_starlette
- py311-googlecloud
- py312-googlecloud
- final_job:
requires:
- python38
Expand All @@ -340,6 +376,8 @@ workflows:
- python311
- python312
- python313
- py39cassandra
- py39couchbase
- py39gevent_starlette
- py39-cassandra
- py39-couchbase
- py39-gevent_starlette
- py311-googlecloud
- py312-googlecloud
7 changes: 7 additions & 0 deletions tests/requirements-googlecloud.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
google-cloud-pubsub>=2.0.0
google-cloud-storage>=2.15.0
google-api-core>=2.15.0
coverage>=5.5
pytest>=6.2.4
mock>=4.0.3
celery>=5.2.7

0 comments on commit 23a25f2

Please sign in to comment.