Skip to content

Commit

Permalink
test(github-ci): add method to ssh into a CI test environment
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rouilj committed Mar 31, 2024
1 parent 2a1746b commit ba4c09c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ on:
schedule:
# monthly build/check
- cron: '23 17 1 * *'
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

# GITHUB_TOKEN only has read repo context.
permissions:
Expand Down Expand Up @@ -95,6 +102,16 @@ jobs:
# continue-on-error: true
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

# https://github.com/mxschmitt/action-tmate
# allow remote ssh into the CI container. I need this to debug
# some xfail cases
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
timeout-minutes: 2
with:
limit-access-to-actor: true

# Setup version of Python to use
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
Expand Down

0 comments on commit ba4c09c

Please sign in to comment.