name: Continuous Integration

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  unit_tests:
    name: Unit Tests
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable

      - name: cargo test
        uses: actions-rs/cargo@v1
        with:
          command: test

  rustfmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Install Rust
        uses: actions-rs/toolchain@v1

        with:
          toolchain: stable
          components: rustfmt
      - name: Check formatting
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: -- --check

name: Continuous Integration

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  unit_tests:
    name: Unit Tests
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable

      - name: cargo test
        uses: actions-rs/cargo@v1
        with:
          command: test

  rustfmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Install Rust
        uses: actions-rs/toolchain@v1

        with:
          toolchain: stable
          components: rustfmt
      - name: Check formatting
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: -- --check --color=always

Add --color=always to cargo fmt
Add --color=always to cargo fmt
