name: ghost_actor

on: [ push ]

jobs:
  fmt-check:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
        toolchain: [stable]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Rust Toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.toolchain }}
          components: rustfmt
      - name: Install Cargo Task
        uses: actions-rs/cargo@v1
        with:
          command: install
          args: cargo-task
      - name: cargo task fmt-check
        uses: actions-rs/cargo@v1
        with:
          command: task
          args: fmt-check
  clippy:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
        toolchain: [stable]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Rust Toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.toolchain }}
          components: clippy
      - name: Install Cargo Task
        uses: actions-rs/cargo@v1
        with:
          command: install
          args: cargo-task
      - name: cargo task clippy
        uses: actions-rs/cargo@v1
        with:
          command: task
          args: clippy
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [
          ubuntu-latest,
          macos-latest,
          windows-latest,
        ]
        toolchain: [stable]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Rust Toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.toolchain }}
      - name: Install Cargo Task
        uses: actions-rs/cargo@v1
        with:
          command: install
          args: cargo-task
      - name: cargo task test
        uses: actions-rs/cargo@v1
        with:
          command: task
          args: test
  readme:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
        toolchain: [stable]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Rust Toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.toolchain }}
      - name: Install Cargo Task
        uses: actions-rs/cargo@v1
        with:
          command: install
          args: cargo-task
      - name: cargo task readme
        uses: actions-rs/cargo@v1
        with:
          command: task
          args: readme
