open-cypher 0.5.0

An unofficial Rust parser for the openCypher query language.
Documentation
name: Mutation testing

on:
  schedule:
    - cron: "29 8 * * 0"
  workflow_dispatch:

permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always

jobs:
  cargo-mutants:
    name: Handwritten Rust mutants (shard ${{ matrix.shard }})
    runs-on: ubuntu-latest
    timeout-minutes: 120
    strategy:
      fail-fast: false
      matrix:
        shard: [0, 1, 2, 3, 4, 5, 6, 7]
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
      - uses: taiki-e/install-action@v2
        with:
          tool: cargo-mutants
      - uses: Swatinem/rust-cache@v2
        with:
          # All shards build the same baseline; one saves, the rest restore.
          shared-key: mutation
          save-if: ${{ matrix.shard == 0 }}
      - name: Run mutation analysis
        id: mutants
        continue-on-error: true
        # Cap address space at 8 GiB so mutants that allocate unboundedly
        # (e.g. broken loop counters) die with an allocation failure instead
        # of OOM-killing the runner VM.
        run: |
          ulimit -v 8388608
          cargo mutants \
            --package open-cypher \
            --all-features \
            --exclude 'src/generated/**' \
            --shard ${{ matrix.shard }}/${{ strategy.job-total }} \
            --sharding round-robin \
            --cargo-arg=--locked \
            --timeout 180 \
            --build-timeout 300
      - name: Upload mutation report
        if: always()
        uses: actions/upload-artifact@v7
        with:
          name: mutants-${{ github.sha }}-shard-${{ matrix.shard }}
          path: mutants.out
          if-no-files-found: error
          retention-days: 30
      - name: Summarize nonzero result
        if: steps.mutants.outcome == 'failure'
        run: echo "Mutation analysis found surviving or timed-out mutants; inspect the artifact."