diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 3965516..9da58e0 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -50,3 +50,9 @@ jobs: run: | pip install "./tests/snowflake-telemetry-test-utils[all]" pytest + - name: Test with tox + run: | + version="${{ matrix.python-version }}" + version_without_dot="${version//./}" + pip install tox + env TOX_SKIP_ENV='^(?!py'"$version_without_dot"'-)' tox diff --git a/tox.ini b/tox.ini index 0bbbf6e..63f7561 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,10 @@ [tox] -envlist = py{38,39,310,311},protobuf-v{3,4,5},no-protobuf,codegen,marshaler +envlist = + py{38,39,310,311,312}, + py{38,39,310,311,312}-no-protobuf, + py{38,39,310,311,312}-protobuf-v{3,4,5}, + py{38,39,310,311,312}-codegen, + py{38,39,310,311,312}-marshaler [testenv] description = Run tests @@ -7,9 +12,14 @@ deps = . ./tests/snowflake-telemetry-test-utils commands = - pytest --ignore=tests/test_proto_serialization.py --ignore=tests/test_protoc_plugin.py + pytest --ignore=tests/test_proto_serialization.py --ignore=tests/test_protoc_plugin.py {posargs} -[testenv:protobuf-v{3,4,5}] +[testenv:py{38,39,310,311,312}-no-protobuf] +description = Run tests without protobuf +setenv = + SNOWFLAKE_TELEMETRY_NO_PROTOBUF = 1 + +[testenv:py{38,39,310,311,312}-protobuf-v{3,4,5}] description = Run tests with protobuf versions deps = . @@ -17,20 +27,8 @@ deps = v3: protobuf>=3.19,<4 v4: protobuf>=4,<5 v5: protobuf>=5,<6 -commands = - pytest --ignore=tests/test_proto_serialization.py --ignore=tests/test_protoc_plugin.py - -[testenv:no-protobuf] -description = Run tests without protobuf -setenv = - SNOWFLAKE_TELEMETRY_NO_PROTOBUF = 1 -deps = - . - ./tests/snowflake-telemetry-test-utils -commands = - pytest --ignore=tests/test_proto_serialization.py --ignore=tests/test_protoc_plugin.py -[testenv:codegen] +[testenv:py{38,39,310,311,312}-codegen] description = Run codegen tests deps = . @@ -38,10 +36,7 @@ deps = commands = pytest tests/test_protoc_plugin.py -[testenv:marshaler] +[testenv:py{38,39,310,311,312}-marshaler] description = Run marshaler tests -deps = - . - ./tests/snowflake-telemetry-test-utils commands = pytest tests/test_proto_serialization.py