Skip to content

Commit

Permalink
give up on the multisite checking
Browse files Browse the repository at this point in the history
we should know it already is multisite so we'll just check that the domains exist
  • Loading branch information
jazzsequence committed Jul 31, 2024
1 parent 2899f36 commit 60c3da8
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -415,17 +415,6 @@ jobs:
terminus local:clone ${{ env.SITE_ID }}
cd ~/pantheon-local-copies/"${{ env.SITE_ID }}"
if ! terminus wp "${{ env.SITE_ID }}".dev -- config is-true MULTISITE; then
echo "Multisite not configured yet..."
echo "Copying multisite application.php"
rm ~/pantheon-local-copies/${{ env.SITE_ID }}/config/application.php
cp "${{ github.workspace }}/.github/fixtures/config/application.subdom.php" ~/pantheon-local-copies/${{ env.SITE_ID }}/config/
mv ~/pantheon-local-copies/${{ env.SITE_ID }}/config/application.subdom.php ~/pantheon-local-copies/${{ env.SITE_ID }}/config/application.php
cd ~/pantheon-local-copies/"${{ env.SITE_ID }}"
git add ~/pantheon-local-copies/${{ env.SITE_ID }}/config/application.php
git commit -m "Set up subdomain multisite config" || true
fi
echo "Copying latest changes and committing to the site."
rsync -a --exclude='.git' --exclude='status-*.txt' --exclude="node_modules" "${{ github.workspace }}/" .
git add -A
Expand All @@ -437,15 +426,15 @@ jobs:
echo "Checking WordPress install status"
terminus wp "${{ env.SITE_ID }}".dev -- cli info
if ! terminus wp "${{ env.SITE_ID }}".dev -- config is-true MULTISITE; then
echo -e "Multisite not found!"
# Run curl checks against the site URLs to ensure the main site and the subdomain site exist.
echo "Checking site URLs"
SITE_URL_TEST=$(curl -s -o /dev/null -w "%{http_code}" ${{ env.SITE_URL }})
SUBDOMAIN_URL_TEST=$(curl -s -o /dev/null -w "%{http_code}" ${{ env.SUBDOMAIN_URL }})
if [ $SITE_URL_TEST -ne 200 ] || [ $SUBDOMAIN_URL_TEST -ne 200 ]; then
echo "One or more site URLs are not returning a 200 status code. Exiting."
exit 1
fi
# Check SUBDOMAIN_INSTALL value
if ! terminus wp "${{ env.SITE_ID }}".dev -- config is-true SUBDOMAIN_INSTALL; then
echo -e "Subdomain configuration not found!"
exit 1
fi
- name: Run Playwright tests
env:
SITE_NAME: ${{ env.SITE_NAME }}
Expand Down

0 comments on commit 60c3da8

Please sign in to comment.