chip_8 0.2.0

CHIP-8 virtual machine / emulator
Documentation
name: lint

on:
  push:
    branches:
      - master
  pull_request:

defaults:
  run:
    shell: bash

env:
  CLIPPY_PARAMS: -W clippy::all -W clippy::pedantic -W clippy::nursery -W clippy::cargo

jobs:
  rustfmt:
    name: rustfmt
    runs-on: ubuntu-latest
    steps:
      - name: checkout source code
        uses: actions/checkout@v2

      - name: install Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true
          components: rustfmt

      - name: run rustfmt
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check --verbose

  # tomlfmt:
  #   name: tomlfmt
  #   runs-on: ubuntu-latest
  #   steps:
  #     - name: Checkout source code
  #       uses: actions/checkout@master

  #     - name: Install Rust
  #       uses: actions-rs/toolchain@v1
  #       with:
  #         profile: minimal
  #         toolchain: nightly
  #         override: true

  #     - name: Install tomlfmt
  #       uses: actions-rs/install@v0.1
  #       with:
  #         crate: cargo-tomlfmt
  #         version: latest
  #         use-tool-cache: true

  #     - name: Run Tomlfmt
  #       uses: actions-rs/cargo@v1
  #       with:
  #         command: tomlfmt
  #         args: --dryrun

  clippy:
    name: clippy
    runs-on: ubuntu-latest
    steps:
      - name: checkout source code
        uses: actions/checkout@master

      - name: install Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true
          components: clippy

      - name: run clippy
        uses: actions-rs/clippy-check@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          args: --all-features -- ${{ env.CLIPPY_PARAMS }}