Skip to content

Commit ba4c09c

Browse files
committed
test(github-ci): add method to ssh into a CI test environment
I still have issues with xfail tests in test_liveserver that I can't reproduce in dev. So try tmate to get a debugging shell. It requires an ssh connection with the key of the user who triggered the build.
1 parent 2a1746b commit ba4c09c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/ci-test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ on:
1919
schedule:
2020
# monthly build/check
2121
- cron: '23 17 1 * *'
22+
workflow_dispatch:
23+
inputs:
24+
debug_enabled:
25+
type: boolean
26+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
27+
required: false
28+
default: false
2229

2330
# GITHUB_TOKEN only has read repo context.
2431
permissions:
@@ -95,6 +102,16 @@ jobs:
95102
# continue-on-error: true
96103
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
97104

105+
# https://github.com/mxschmitt/action-tmate
106+
# allow remote ssh into the CI container. I need this to debug
107+
# some xfail cases
108+
- name: Setup tmate session
109+
uses: mxschmitt/action-tmate@v3
110+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
111+
timeout-minutes: 2
112+
with:
113+
limit-access-to-actor: true
114+
98115
# Setup version of Python to use
99116
- name: Set Up Python ${{ matrix.python-version }}
100117
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0

0 commit comments

Comments
 (0)