Skip to content

Commit 6396bf2

Browse files
rfayclaude
andcommitted
ci: push script file to workspace instead of bash -c for #71 (Phase 4)
coder ssh mangles newlines in multi-line bash -c arguments regardless of quoting style. Push the script via heredoc+cat into a temp file, then run the file in a separate coder ssh call — no quoting issues and no stdin sharing with ddev start. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 49a615d commit 6396bf2

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

.github/workflows/integration-test.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,20 @@ jobs:
147147

148148
- name: Verify workspace — DDEV can start a project
149149
run: |
150-
coder ssh ${{ env.WORKSPACE_NAME }} -- env CI=${{ env.CI }} DDEV_NONINTERACTIVE=${{ env.DDEV_NONINTERACTIVE }} NO_COLOR=${{ env.NO_COLOR }} bash -c '
151-
set -euo pipefail
152-
TESTDIR=/tmp/ci-ddev-${{ github.run_id }}
153-
echo "--- Creating test project in $TESTDIR ---"
154-
mkdir -p "$TESTDIR" && cd "$TESTDIR"
155-
ddev config --project-type=php --docroot=web
156-
echo "--- Starting DDEV project ---"
157-
ddev start -y
158-
echo "--- Deleting DDEV project ---"
159-
ddev delete --omit-snapshot -y
160-
rm -rf "$TESTDIR"
161-
echo "--- DDEV test complete ---"
162-
'
150+
coder ssh ${{ env.WORKSPACE_NAME }} -- bash -c 'cat > /tmp/ddev-ci-test.sh' << 'SCRIPT'
151+
set -euo pipefail
152+
TESTDIR=/tmp/ci-ddev-${{ github.run_id }}
153+
echo "--- Creating test project in $TESTDIR ---"
154+
mkdir -p "$TESTDIR" && cd "$TESTDIR"
155+
ddev config --project-type=php --docroot=web
156+
echo "--- Starting DDEV project ---"
157+
ddev start -y
158+
echo "--- Deleting DDEV project ---"
159+
ddev delete --omit-snapshot -y
160+
rm -rf "$TESTDIR"
161+
echo "--- DDEV test complete ---"
162+
SCRIPT
163+
coder ssh ${{ env.WORKSPACE_NAME }} -- env CI=${{ env.CI }} DDEV_NONINTERACTIVE=${{ env.DDEV_NONINTERACTIVE }} NO_COLOR=${{ env.NO_COLOR }} bash /tmp/ddev-ci-test.sh
163164
164165
- name: Delete workspace
165166
if: always()

0 commit comments

Comments
 (0)