ci: add github actions debugging with tmate
Usage is to run a workflow manually with debug_enabled on. https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow#running-a-workflow https://github.com/marketplace/actions/debugging-with-tmate
This commit is contained in:
14
.github/workflows/test.yaml
vendored
14
.github/workflows/test.yaml
vendored
@@ -8,6 +8,12 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
debug_enabled:
|
||||
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
|
||||
required: false
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
# Build Docker image and push to Github Container Registry.
|
||||
@@ -139,5 +145,13 @@ jobs:
|
||||
- name: Prepare database
|
||||
run: config/docker/prepare-tests.sh
|
||||
|
||||
- name: Setup tmate session
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
timeout-minutes: 10
|
||||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
|
||||
with:
|
||||
limit-access-to-actor: true
|
||||
sudo: false
|
||||
|
||||
- name: Run tests
|
||||
run: bin/rails test
|
||||
|
||||
Reference in New Issue
Block a user