name: Weekly Mutation Testing on: # Run every Monday at 9 AM UTC schedule: - cron: '0 9 * * 1' # Allow manual trigger workflow_dispatch: env: CARGO_TERM_COLOR: always jobs: cargo-mutants: runs-on: ubuntu-latest permissions: contents: read issues: write steps: - uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable - uses: taiki-e/install-action@v2 with: tool: cargo-mutants - name: Run mutation tests on cashu crate run: cargo mutants --package cashu --in-place --no-shuffle continue-on-error: true - name: Upload mutation results uses: actions/upload-artifact@v4 if: always() with: name: mutants.out path: mutants.out retention-days: 90 - name: Check for missed mutants and create issue if: always() run: | if [ -s mutants.out/missed.txt ]; then echo "Missed mutants found" MUTANTS_VERSION=$(cargo mutants --version) MISSED_COUNT=$(wc -l < mutants.out/missed.txt) CAUGHT_COUNT=$(wc -l < mutants.out/caught.txt 2>/dev/null || echo "0") gh issue create \ --title "🧬 Weekly Mutation Testing Report - $(date +%Y-%m-%d)" \ --label "mutation-testing,weekly-report" \ --body "$(cat <