Skip to content

Commit 8d7cdd7

Browse files
committed
Add a way to debug github CI
1 parent 5954156 commit 8d7cdd7

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
name: Build
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
pull_request:
6+
workflow_call:
7+
inputs:
8+
debug_ssh_session:
9+
required: false
10+
type: boolean
11+
412

513
env:
614
PYTEST_ADDOPTS: --color=yes
@@ -18,6 +26,11 @@ jobs:
1826
run: |
1927
python -m pip install --upgrade pip setuptools wheel
2028
pip install .[qa] .[testing]
29+
- name: Setup tmate session
30+
uses: mxschmitt/action-tmate@v3
31+
if: ${{ inputs.debug_ssh_session }}
32+
with:
33+
limit-access-to-actor: true
2134
- name: Run Flake8
2235
# Ignore F401, which are unused imports. flake8 is a primitive tool and is sometimes wrong.
2336
run: flake8 --extend-ignore F401 parso test/*.py setup.py scripts/

.github/workflows/debug_ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Debug CI
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
tests:
8+
uses: ./.github/workflows/tests.yml
9+
with:
10+
all_tests: true
11+
debug_ssh_session: true
12+
secrets: inherit

0 commit comments

Comments
 (0)