reducer 3.0.1

A predictable reactive framework for Rust apps
Documentation
name: CI

on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master
  schedule:
  - cron:  '0 6 * * SAT'

jobs:
  fmt:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: actions-rs/toolchain@v1
      with:
        override: true
        profile: minimal
        toolchain: stable
        components: rustfmt
    - uses: actions-rs/cargo@v1
      with:
        command: fmt
        args: --all -- --check

  clippy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: actions-rs/toolchain@v1
      with:
        override: true
        profile: minimal
        toolchain: stable
        components: clippy
    - uses: actions-rs/clippy-check@v1
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        args: --all-targets -- -D warnings

  audit:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: actions-rs/audit-check@v1
      with:
        token: ${{ secrets.GITHUB_TOKEN }}

  check:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: actions-rs/toolchain@v1
      with:
        override: true
        profile: minimal
        toolchain: stable
        target: thumbv7m-none-eabi
    - uses: actions-rs/cargo@v1
      with:
        command: check
        args: --all
    - uses: actions-rs/cargo@v1
      with:
        command: check
        args: --all --no-default-features --target thumbv7m-none-eabi

  doc:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: actions-rs/toolchain@v1
      with:
        override: true
        profile: minimal
        toolchain: stable
    - uses: actions-rs/cargo@v1
      with:
        command: doc
        args: --all-features --no-deps

  test:
    needs: [fmt, clippy, audit, check, doc]
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]
        rust: [stable, nightly]
    steps:
    - run: sudo -E apt-get -yq update
      if: matrix.os == 'ubuntu-latest'
    - run: sudo -E apt-get -yq install libxcb-shape0-dev libxcb-xfixes0-dev
      if: matrix.os == 'ubuntu-latest'
    - uses: actions/checkout@master
    - uses: actions-rs/toolchain@v1
      with:
        override: true
        profile: minimal
        toolchain: ${{ matrix.rust }}
    - uses: actions-rs/cargo@v1
      with:
        command: test
    - uses: actions-rs/cargo@v1
      with:
        command: test
        args: --no-default-features
    - uses: actions-rs/cargo@v1
      with:
        command: test
        args: --no-default-features --features alloc
    - uses: actions-rs/cargo@v1
      with:
        command: test
        args: --no-default-features --features std
    - uses: actions-rs/cargo@v1
      with:
        command: test
        args: --no-default-features --features async

  miri:
    needs: [test]
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: actions-rs/toolchain@v1
      with:
        override: true
        profile: minimal
        toolchain: nightly
        components: miri, rust-src
    - uses: actions-rs/cargo@v1
      with:
        command: miri
        args: setup
    - uses: actions-rs/cargo@v1
      with:
        command: miri
        args: test --all-features
      env:
        MIRIFLAGS: "-Zmiri-disable-isolation"
        PROPTEST_CASES: 1

  sanitize:
    needs: [test]
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        sanitizer: [address, leak, memory, thread]
    steps:
    - uses: actions/checkout@master
    - uses: actions-rs/toolchain@v1
      with:
        override: true
        profile: minimal
        toolchain: nightly
        components: rust-src
    - uses: actions-rs/cargo@v1
      with:
        command: test
        args: --tests --lib --all-features --target x86_64-unknown-linux-gnu -Z build-std
      env:
        RUSTFLAGS: "-Z sanitizer=${{ matrix.sanitizer }}"

  coverage:
    needs: [test]
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: actions-rs/toolchain@v1
      with:
        override: true
        profile: minimal
        toolchain: stable
    - uses: actions-rs/tarpaulin@v0.1
      with:
        args: --all-features --avoid-cfg-tarpaulin
    - uses: codecov/codecov-action@v2
      with:
        token: ${{secrets.CODECOV_TOKEN}}
        fail_ci_if_error: true

  examples:
    needs: [test]
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]
    steps:
    - run: sudo -E apt-get -yq update
      if: matrix.os == 'ubuntu-latest'
    - run: sudo -E apt-get -yq install libxcb-shape0-dev libxcb-xfixes0-dev
      if: matrix.os == 'ubuntu-latest'
    - uses: actions/checkout@master
    - uses: actions-rs/toolchain@v1
      with:
        override: true
        profile: minimal
        toolchain: stable
    - uses: actions-rs/cargo@v1
      with:
        command: build
        args: --release --examples