diff --git a/.github/snippets/settings.local.php b/.github/snippets/settings.local.php new file mode 100644 index 0000000..3e96346 --- /dev/null +++ b/.github/snippets/settings.local.php @@ -0,0 +1,35 @@ +> ~/.ssh/known_hosts + ssh-keyscan git.uk-1.platform.sh >> ~/.ssh/known_hosts + + # Non-database Psh commands. + - name: Spin up environment + run: ~/.platformsh/bin/platform environment:activate -p XXX -e ${GITHUB_REF#refs/heads/} --yes + + - name: connect to psh PR db + run: | + nohup platform tunnel:single --project=nlw7xhb3fyt7y --environment=${GITHUB_REF#refs/heads/} --port=30123 --relationship=database --yes & > phpd.log 2>&1 & + + - name: Drupal config to access db + run: | + cp ./.github/snippets/settings.local.php ./web/sites/default/settings.local.php + + # Finally, run the tests. + - name: Run Behat tests + run: | + ./vendor/bin/behat + + - name: Tear it all down + run: | + platform tunnel:close --project=nlw7xhb3fyt7y --environment=${GITHUB_REF#refs/heads/} --yes