Skip to content

Commit

Permalink
add ability to debug ci
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Fitzgerald <[email protected]>
  • Loading branch information
joefitzgerald committed Nov 17, 2023
1 parent 81ff4b8 commit 2667e5d
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: Build and Test
on: [push, pull_request]
on:
push:
pull_request:
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
jobs:
build:
name: Build and Test
Expand All @@ -10,15 +19,17 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

- name: Build and Test
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Build and Test (Linux and macOS)
run: ./scripts/ci.sh
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Build and Test
if: ${{ matrix.os != 'windows-latest' }}
- name: Build and Test (Windows)
run: .\scripts\ci.ps1
if: ${{ matrix.os == 'windows-latest' }}

0 comments on commit 2667e5d

Please sign in to comment.