From 4e632863622c2662223f3f46d8d42e87f4d4f295 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 27 Sep 2024 16:10:41 -0400 Subject: [PATCH] Add ability to setup tmate debug session Current desire/need is to troubleshoot https://github.com/dandi/dandi-cli/pull/1499 but moreover -- Windows. Not yet even sure if would work for windows but still -- would be good to have generally May be later we should parametrize more, not for every debug run --- .github/workflows/test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e7988ba1b..ee94e0e34 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,13 @@ on: pull_request: schedule: - cron: '0 6 * * *' + 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 concurrency: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }} @@ -93,6 +100,10 @@ jobs: if: github.event_name == 'schedule' run: echo PYTEST_ADDOPTS=--scheduled >> "$GITHUB_ENV" + - name: "(debug mode) Setup tmate session" + uses: mxschmitt/action-tmate@v3 + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} + - name: Run all tests if: matrix.mode != 'dandi-api' run: |