Skip to content
Open
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
29 changes: 27 additions & 2 deletions .github/workflows/module_acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down