Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/drupal-contrib-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Drupal Contrib Integration Tests
# contrib-plain — matrix of known modules on D11, runs on every
# push to main and nightly
# contrib-issue-fork — single workspace using a real drupal.org contrib issue
# fork, runs nightly only
# fork, runs on every push to main, PRs, and nightly
#
# Repository variables (optional, set in GitHub → Settings → Variables):
# CONTRIB_TEST_PROJECT - Module machine name for issue fork test (default: token)
Expand Down Expand Up @@ -204,10 +204,7 @@ jobs:

contrib-issue-fork:
name: Contrib ${{ vars.CONTRIB_TEST_PROJECT || 'token' }} issue fork
if: |
vars.CONTRIB_TEST_ISSUE_FORK != '' &&
github.event_name != 'push' &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner)
if: ${{ vars.CONTRIB_TEST_ISSUE_FORK != '' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner) }}
runs-on: [self-hosted, sysbox]
defaults:
run:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/drupal-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Drupal Integration Tests
# drupal-plain — matrix of D11 and D12, no issue fork, runs on every
# push to main and nightly
# drupal-issue-fork — single workspace using a real drupal.org issue fork,
# runs nightly only
# runs on every push to main, PRs, and nightly
#
# Repository variable:
# DRUPAL_TEST_ISSUE_FORK - drupal.org issue number (bare, e.g. 3585397) or
Expand Down Expand Up @@ -195,9 +195,7 @@ jobs:

drupal-issue-fork:
name: Drupal issue fork ${{ vars.DRUPAL_TEST_ISSUE_FORK || '3585397' }}
if: |
github.event_name != 'push' &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner)
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
runs-on: [self-hosted, sysbox]
defaults:
run:
Expand Down
29 changes: 25 additions & 4 deletions drupal-contrib/template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,30 @@ COMPOSE_EOF
fi

if [ "$SETUP_FAILED" = "false" ]; then
# Restart triggers ddev symlink-project automatically
# Restart triggers ddev symlink-project automatically.
# symlink-project creates web/modules/custom/<project> -> project root.
# Without this symlink drush cannot discover the module.
log_setup "Restarting DDEV to trigger symlink-project..."
ddev restart >> "$SETUP_LOG" 2>&1 || true
update_status "⏳ DDEV restart: In progress..."
if ddev restart >> "$SETUP_LOG" 2>&1; then
log_setup "✓ DDEV restarted"
update_status "✓ DDEV restart: Success"
else
log_setup "✗ DDEV restart failed — trying stop + start..."
update_status "⚠ DDEV restart: Retrying..."
ddev stop >> "$SETUP_LOG" 2>&1 || true
if ddev start >> "$SETUP_LOG" 2>&1; then
log_setup "✓ DDEV started (after restart failure)"
update_status "✓ DDEV restart: Success (via stop+start)"
else
log_setup "✗ DDEV start failed after restart failure"
update_status "✗ DDEV restart: Failed"
SETUP_FAILED=true
fi
fi
fi

if [ "$SETUP_FAILED" = "false" ]; then
# Install Drupal
INSTALL_PROFILE="${data.coder_parameter.install_profile.value}"
log_setup "Installing Drupal ($INSTALL_PROFILE profile)..."
Expand Down Expand Up @@ -717,8 +737,9 @@ COMPOSE_EOF
log_setup "✓ $PROJECT_NAME enabled"
update_status "✓ $PROJECT_NAME: Enabled"
else
log_setup "⚠ Warning: $PROJECT_NAME not found in enabled modules list"
update_status "⚠ $PROJECT_NAME: Not enabled (check /tmp/drupal-setup.log)"
log_setup "✗ $PROJECT_NAME not found in enabled modules — enable failed"
update_status "✗ $PROJECT_NAME: Not enabled (check /tmp/drupal-setup.log)"
SETUP_FAILED=true
fi
fi
fi
Expand Down