Skip to content

Run PHP 8.4 and 8.5 checks in pinned official containers #88

Run PHP 8.4 and 8.5 checks in pinned official containers

Run PHP 8.4 and 8.5 checks in pinned official containers #88

name: playground journeys
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: playground-journeys-${{ github.event_name }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
journeys:
name: Playground journeys (PHP/Python/Rust) on the published tuple
runs-on: ubuntu-latest
timeout-minutes: 30
env:
PLAYGROUND_COMPOSE_PROJECT: sample-app-playground-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.13'
- name: Select authenticated dependency trust
uses: durable-workflow/.github/.github/actions/bootstrap-patched-pip@52283e2e8ea9a2cf7e3865ee30f2a72a38b098a2 # clean-trust
with:
clients: pip,python,composer,curl,git
- name: Disable APT download retries (CVE-2026-109518)
run: echo 'Acquire::Retries "0";' | sudo tee /etc/apt/apt.conf.d/99-no-retries >/dev/null
- name: Check out the accepted PHP container build source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: durable-workflow/.github
ref: 18783be6bef737cc778e4c7282a8797e39daa61a
path: .central-apt-source
persist-credentials: false
- name: Build the pinned PHP runtime and install launchers
run: bash "$GITHUB_WORKSPACE/scripts/ci/setup-php-container.sh" "8.4"
- name: Verify actual Composer trust before dependency requests
uses: durable-workflow/.github/.github/actions/verify-composer-trust@52283e2e8ea9a2cf7e3865ee30f2a72a38b098a2 # clean-trust
- name: Verify the playground Composer configuration
uses: durable-workflow/.github/.github/actions/verify-composer-trust@52283e2e8ea9a2cf7e3865ee30f2a72a38b098a2 # clean-trust
with:
working-directory: playground/php-runtime
- name: Install the exact published tuple
run: |
while IFS= read -r assignment; do export "$assignment"; done \
< <(scripts/resolve-current-artifacts.sh)
composer install --prefer-dist --no-progress --no-interaction
composer install --working-dir=playground/php-runtime --prefer-dist --no-dev --no-progress --no-interaction
python -m pip install "durable-workflow==${DURABLE_WORKFLOW_PYTHON_SDK_VERSION}"
curl --proto "=https" --tlsv1.2 -fsSL https://durable-workflow.com/install.sh -o "$RUNNER_TEMP/dw-install.sh"
mkdir -p "$RUNNER_TEMP/bin"
# The installer refuses to finish unless its directory is already on PATH.
export PATH="$RUNNER_TEMP/bin:$PATH"
VERSION="$DURABLE_WORKFLOW_CLI_VERSION" DURABLE_WORKFLOW_INSTALL_DIR="$RUNNER_TEMP/bin" \
sh "$RUNNER_TEMP/dw-install.sh"
# The development image provides these two wrappers on PATH.
install -m 0755 .devcontainer/docker/with-disposable-composer-state \
.devcontainer/docker/with-group-shared-umask "$RUNNER_TEMP/bin/"
echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
- name: Check the playground toolchain
run: scripts/playground doctor
- name: Run each SDK journey against the published native Server
env:
PLAYGROUND_SOURCE_ROOT: ${{ env.SAMPLE_APP_PHP_CI_STATE }}/source
run: |
mkdir -p "$RUNNER_TEMP/playground-evidence"
for language in php python rust; do
scripts/playground "$language" \
--evidence "$RUNNER_TEMP/playground-evidence/$language.json"
scripts/playground down "$language"
done
python scripts/ci/validate-playground-evidence.py "$RUNNER_TEMP"/playground-evidence/*.json
- name: Remove playground services
if: always()
run: |
for language in php python rust; do scripts/playground down "$language" || true; done
- name: Retain journey evidence
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: playground-journeys-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/playground-evidence/*.json
if-no-files-found: warn
retention-days: 30