@@ -30,11 +30,13 @@ phases:
3030 - echo "Installing aws-encryption-sdk version $VERSION"
3131 - pip install "aws-encryption-sdk==$VERSION"
3232 - pip install "tox < 4.0"
33+ # Export VERSION for subprocesses to use
34+ - export VERSION="$VERSION"
3335 build :
3436 commands :
3537 # Create a simple tox.ini file for running examples with the installed package
3638 - |
37- cat > release_validation_tox.ini << ' EOF'
39+ cat > release_validation_tox.ini << EOF
3840 [tox]
3941 envlist = py311
4042 skipsdist = True
@@ -59,6 +61,7 @@ phases:
5961 moto
6062 boto3
6163 cryptography
64+ aws-encryption-sdk==$VERSION
6265 commands =
6366 # Run non-MPL examples
6467 pytest examples/test/legacy/ -m examples
@@ -101,9 +104,42 @@ phases:
101104 - |
102105 while [ $NUM_RETRIES -gt 0 ]
103106 do
104- # Only run the MPL-specific tests that require special permissions
105- # These would normally be run with py311-mplexamples-mpl
106- python -m pytest examples/test/ -m examples --ignore examples/test/legacy/
107+ # Create a fresh tox.ini for MPL tests with correct dependencies
108+ echo "Creating MPL tox.ini with VERSION=$VERSION"
109+ cat > mpl_validation_tox.ini << EOF
110+ [tox]
111+ envlist = py311
112+ skipsdist = True
113+
114+ [testenv]
115+ passenv =
116+ AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID
117+ AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2
118+ AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1
119+ AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_2
120+ AWS_ACCESS_KEY_ID
121+ AWS_SECRET_ACCESS_KEY
122+ AWS_SESSION_TOKEN
123+ AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
124+ AWS_PROFILE
125+ deps =
126+ pytest
127+ pytest-mock
128+ mock
129+ coverage
130+ pyyaml
131+ moto
132+ boto3
133+ cryptography
134+ aws-encryption-sdk==$VERSION
135+ -r requirements_mpl.txt
136+ commands =
137+ # Only run the MPL-specific tests
138+ pytest examples/test/ -m examples --ignore examples/test/legacy/
139+ EOF
140+
141+ # Run the MPL-specific tests
142+ tox -c mpl_validation_tox.ini -e py311
107143 if [ $? -eq 0 ]; then
108144 break
109145 fi
0 commit comments