Skip to content

ci: add integration tests workflow for cross-repo testing #2

ci: add integration tests workflow for cross-repo testing

ci: add integration tests workflow for cross-repo testing #2

name: Integration Tests
on:
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
integration-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.13"]
steps:
- name: Parse testing SDK branch from PR body
id: parse
run: |
BODY="${{ github.event.pull_request.body }}"
# Look for a line like: TESTING_SDK_BRANCH: feature/foo
REF=$(printf "%s\n" "$BODY" | sed -n 's/^TESTING_SDK_BRANCH:[[:space:]]*//p' | head -n1)
if [ -z "$REF" ]; then REF="main"; fi
echo "testing_ref=$REF" >> "$GITHUB_OUTPUT"
echo "Using testing SDK branch: $REF"
- name: Checkout Language SDK (this PR)
uses: actions/checkout@v5
with:
path: language-sdk
- name: Checkout Testing SDK
uses: actions/checkout@v5
with:
repository: aws/aws-durable-execution-sdk-python-testing
ref: ${{ steps.parse.outputs.testing_ref }}
token: ${{ secrets.CROSS_REPO_PAT }}
path: testing-sdk
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install Hatch
run: python -m pip install --upgrade hatch
- name: Install local Language SDK
working-directory: language-sdk
run: |
# Install the local Language SDK in development mode
python -m pip install -e .
- name: Setup and run Testing SDK
working-directory: testing-sdk
run: |
echo "Running Testing SDK tests against Language SDK PR changes..."
# Install testing SDK with local Language SDK
python -m pip install -e . -e ../language-sdk
hatch fmt --check
hatch run types:check
hatch run test:cov
hatch run test:examples
hatch build