Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Mutation Testing Quality Gate

on:
push:
branches:
- main
pull_request:
branches:
- '*'

jobs:
mutation-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run mutation tests
run: npm run test:mutation
- name: Enforce mutation score threshold
run: |
MUTATION_SCORE=$(cat reports/mutation/mutation.json | jq '.mutationScore' -r)
echo "Mutation Score: $MUTATION_SCORE"
if (( $(echo "$MUTATION_SCORE < 80" | bc -l) )); then
echo "Mutation score below threshold (80). Failing CI."
exit 1
fi
Loading