Skip to content

test: add x_ray assertion #1842

test: add x_ray assertion

test: add x_ray assertion #1842

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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Lint commit messages
run: python .github/scripts/lintcommit.py --range "origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.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 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