# Miri - undefined behavior detection
name: Miri
on:
  push:
    branches:
      - master
  pull_request:
  schedule:
    - cron: "0 0 * * 0"
permissions:
  contents: read
concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true
jobs:
  miri:
    name: Miri
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6
      - name: Install Rust nightly
        uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          toolchain: nightly
          components: miri
      - name: Install cargo-nextest
        uses: taiki-e/install-action@v2
        with:
          tool: cargo-nextest
      - name: Run
        run: cargo miri nextest run --lib --all-features -j num-cpus --fail-fast
