diff --git a/.github/workflows/module_acceptance.yml b/.github/workflows/module_acceptance.yml index 3ff132c..4d5c7a9 100644 --- a/.github/workflows/module_acceptance.yml +++ b/.github/workflows/module_acceptance.yml @@ -26,7 +26,10 @@ on: description: "Disable and stop apparmor" default: false type: boolean - + ssh-debugging: + description: Boolean; whether or not to pause for ssh debugging + default: true + type: boolean # ENABLE PUPPETCORE. The calling workflow must: # - Set a valid PUPPET_FORGE_TOKEN secret on its repository. @@ -119,7 +122,11 @@ jobs: sudo systemctl disable apparmor sudo systemctl stop apparmor fi - + - name: Start SSH session + uses: luchihoratiu/debug-via-ssh@main + with: + NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} + SSH_PASS: ${{ secrets.SSH_PASS }} - name: "Setup ruby" uses: "ruby/setup-ruby@v1" with: @@ -157,10 +164,28 @@ jobs: run: | bundle exec rake 'litmus:install_module' + - name: Wait as long as the file ${HOME}/pause file is present + run: | + while [ -f "${HOME}/pause" ] ; do + echo "${HOME}/pause present, sleeping for 60 seconds..." + sleep 60 + done + echo "${HOME}/pause absent, continuing workflow." + + - name: "Run acceptance tests" run: | bundle exec rake 'litmus:acceptance:parallel' + - name: Wait as long as the file ${HOME}/pause file is present + if: ${{ always() && github.event.inputs.ssh-debugging == true }} + run: | + while [ -f "${HOME}/pause" ] ; do + echo "${HOME}/pause present, sleeping for 60 seconds..." + sleep 60 + done + echo "${HOME}/pause absent, continuing workflow." + - name: "Remove test environment" if: ${{ always() }} continue-on-error: true