Skip to content

Commit e0064be

Browse files
committed
Add workflow_dispatch for manual mutation testing
Adds options to run mutation testing manually with: - Custom target (e.g., ./internal/reporter/reporter.go) - Full scan mode (without diff-base) Enables running complete mutation scans on specific files.
1 parent 5cded0b commit e0064be

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ on:
55
branches: [main, test]
66
pull_request:
77
branches: [main, test]
8+
workflow_dispatch:
9+
inputs:
10+
mutation_target:
11+
description: 'Target for mutation testing (e.g., ./internal/reporter/reporter.go)'
12+
required: false
13+
default: './internal/...'
14+
full_scan:
15+
description: 'Run full scan without diff-base'
16+
required: false
17+
type: boolean
18+
default: false
819

920
permissions:
1021
contents: write
@@ -109,9 +120,16 @@ jobs:
109120

110121
- name: Run mutation testing
111122
run: |
123+
TARGET="${{ inputs.mutation_target || './internal/...' }}"
124+
DIFF_BASE_FLAG=""
125+
if [ "${{ inputs.full_scan }}" != "true" ]; then
126+
DIFF_BASE_FLAG="--diff-base origin/main"
127+
fi
128+
echo "Running mutation testing on: $TARGET"
129+
echo "Full scan mode: ${{ inputs.full_scan || 'false' }}"
112130
./mutagoph run \
113-
--target ./internal/... \
114-
--diff-base origin/main \
131+
--target "$TARGET" \
132+
$DIFF_BASE_FLAG \
115133
--mutations mutilated \
116134
--parallelism mutilated \
117135
--timeout 5s \

0 commit comments

Comments
 (0)