Skip to content

fix: avoid unsafe yaml load in conformance tests #2563

fix: avoid unsafe yaml load in conformance tests

fix: avoid unsafe yaml load in conformance tests #2563

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
permissions:
contents: read
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint-commits:
if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Lint commit messages
env:
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: python .github/scripts/lintcommit.py --range "${PR_BASE_SHA}..${PR_HEAD_SHA}"
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11","3.12","3.13","3.14"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Hatch
run: |
python -m pip install hatch==1.16.5
- name: static analysis
run: |
for pkg in packages/*/; do
if [ -f "$pkg/pyproject.toml" ]; then
echo "=== Checking format: $pkg ==="
cd "$pkg"
hatch fmt --check
cd "$GITHUB_WORKSPACE"
fi
done
- name: type checking
run: hatch run types:check
- name: Run tests + coverage
run: hatch run test:cov
- name: Build distribution
run: |
for pkg in packages/*/; do
if [ -f "$pkg/pyproject.toml" ]; then
echo "=== Building: $pkg ==="
cd "$pkg"
hatch build
cd "$GITHUB_WORKSPACE"
fi
done
- name: Verify OTel wheel dependency contract
run: |
OTEL_WHEEL=$(find packages/aws-durable-execution-sdk-python-otel/dist \
-name 'aws_durable_execution_sdk_python_otel-*.whl' -print -quit)
python .github/scripts/check_otel_wheel_dependencies.py "$OTEL_WHEEL"
- name: Verify legal files in published distributions
run: |
python .github/scripts/check_dist_legal_files.py \
packages/aws-durable-execution-sdk-python \
packages/aws-durable-execution-sdk-python-otel \
packages/aws-durable-execution-sdk-python-testing