name: miri
permissions:
  contents: read
  pull-requests: read

on:
  workflow_dispatch:
  schedule: [cron: "20 */8 * * *"]

env:
  CARGO_TERM_COLOR: always

jobs:
  build_and_test:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: install miri
      run:  rustup component add --toolchain nightly-x86_64-unknown-linux-gnu miri

    - name: Run miri tests
      run: scripts/miri.sh

