Skip to content

Commit 990d0da

Browse files
committed
chore: validate release
1 parent 73ca27d commit 990d0da

File tree

3 files changed

+44
-12
lines changed

3 files changed

+44
-12
lines changed

codebuild/release/validate_released_with_examples.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ phases:
2525
- pip install "aws-encryption-sdk[MPL]==$VERSION"
2626
build:
2727
commands:
28-
# Verify installation
29-
- python -c "import aws_encryption_sdk; print(f'Using aws-encryption-sdk version: {aws_encryption_sdk.__version__}')"
30-
3128
# Set initial retry count
3229
- NUM_RETRIES=3
3330

codebuild/release/validate_test_vectors.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@ version: 0.2
22

33
env:
44
variables:
5-
# Default VERSION if not provided externally
65
VERSION: 4.0.2
76

87
phases:
98
install:
109
commands:
11-
- cd ..
1210
- pip install "tox < 4.0" poetry
1311
- pip install --upgrade pip
1412
# Get Dafny
@@ -21,7 +19,6 @@ phases:
2119
dotnet: 6.0
2220
pre_build:
2321
commands:
24-
# Setup environment
2522
- aws configure set region us-west-2
2623
- git clone https://github.com/aws/aws-encryption-sdk.git
2724
- cd aws-encryption-sdk && git submodule update --init --recursive && cd ..
@@ -34,13 +31,10 @@ phases:
3431
commands:
3532
- NUM_RETRIES=3
3633
- |
37-
run_command() {
38-
eval "$1"
39-
return $?
40-
}
34+
python -c "import aws_encryption_sdk; print(f'Using aws-encryption-sdk {aws_encryption_sdk.__version__}')"
35+
cd aws-encryption-sdk/TestVectors
4136
42-
# Navigate to TestVectors directory
43-
cd aws-encryption-sdk/TestVectors || exit 1
37+
export PATH=$(pyenv prefix)/bin:$PATH
4438
4539
while [ $NUM_RETRIES -gt 0 ]
4640
do

tox.ini

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 =
395397
commands =
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

Comments
 (0)