awsmfa 0.3.2

The automation tool for Multi-Factor Authentication (MFA) process to use awscli.
Documentation
on:
  pull_request:
  push:
    branches: [ 'main' ]
    tags-ignore: [ '*' ]
  workflow_dispatch:

name: Build

env:
  RUST_BACKTRACE: full

jobs:
  check:
    name: Check
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v3

      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable

      - name: Run cargo check
        run: cargo check

  test:
    name: Test -- ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - macos-latest
          - ubuntu-latest
          - windows-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v3

      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable

      - name: Use cache
        uses: Swatinem/rust-cache@v2
        with:
          shared-key: ${{ matrix.os }}

      - name: Run cargo test
        run: cargo test

  lints:
    name: Lints
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v3

      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          components: clippy

      - name: Run cargo clippy
        run: cargo clippy -- -D warnings