@@ -52,6 +52,8 @@ envlist =
5252# build :: Builds source and wheel dist files.
5353# test-release :: Builds dist files and uploads to testpypi pypirc profile.
5454# release :: Builds dist files and uploads to pypi pypirc profile.
55+ # validate-pypi-release :: Tests a released version from PyPI instead of source.
56+ # validate-pypi-release-mpl :: Tests a released version with MPL features.
5557
5658# Reporting environments:
5759#
@@ -395,3 +397,42 @@ passenv =
395397commands =
396398 {[testenv:release-base]commands}
397399 twine upload --skip-existing --repository pypi {toxinidir}/dist/*
400+
401+ # Test the PyPI released version (not local source code)
402+ [testenv:py-validate]
403+ basepython = python3
404+ skip_install = true
405+ passenv = {[testenv]passenv}
406+ deps =
407+ pytest
408+ pytest-mock
409+ mock
410+ coverage
411+ # Add dev requirements for testing
412+ -rdev_requirements/test-requirements.txt
413+ commands =
414+ # First, install the specified version from PyPI
415+ pip install " aws-encryption-sdk[MPL]=={posargs:latest}" --force-reinstall
416+ # Install MPL requirements if running MPL examples
417+ mplexamples: pip install -r requirements_mpl.txt
418+ # Run non-MPL examples
419+ examples: {[testenv:base-command]commands} examples/test/legacy/ -m examples
420+ # Run MPL-specific examples
421+ mplexamples: {[testenv:base-command]commands} examples/test/ -m examples --ignore examples/test/legacy/
422+
423+ # Shortcuts for validating specific versions
424+ [testenv:validate-pypi-release]
425+ basepython = {[testenv:py-validate]basepython}
426+ skip_install = {[testenv:py-validate]skip_install}
427+ passenv = {[testenv:py-validate]passenv}
428+ deps = {[testenv:py-validate]deps}
429+ factors = examples
430+ commands = {[testenv:py-validate]commands}
431+
432+ [testenv:validate-pypi-release-mpl]
433+ basepython = {[testenv:py-validate]basepython}
434+ skip_install = {[testenv:py-validate]skip_install}
435+ passenv = {[testenv:py-validate]passenv}
436+ deps = {[testenv:py-validate]deps}
437+ factors = mplexamples
438+ commands = {[testenv:py-validate]commands}
0 commit comments