ft-cli 0.1.0

ft-cli is a tool for syncing a git repo or a local folder to a FifthTry account
name: Rust Checks

on:
  push:
    branches:
      - main
    paths:
     - '**.rs'
     - '**.yml'
     - 'rust-toolchain'
     - 'tests/**'
  pull_request:
    branches:
      - main
    paths:
     - '**.rs'
     - '**.yml'
     - 'rust-toolchain'
     - 'tests/**'
jobs:
  everything:
    name: Rust Checks
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          override: true
          components: rustfmt, clippy
      - uses: actions/cache@v2  # there is also https://github.com/Swatinem/rust-cache
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            ~/.cargo/bin
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
      - name: Check if sources are properly formatted
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check
      - name: Checking if clippy is happy
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --all -- -D warnings
      - name: Check if test passes
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --all