temp-env 0.2.0

Set environment variables temporarily.
Documentation
name: build

on: [push, pull_request]

jobs:
  build:
    name: Build
    strategy:
      fail-fast: false
      matrix:
        platform: [ubuntu-latest, macos-latest, windows-latest]
        toolchain: [stable]
    runs-on: ${{ matrix.platform }}

    steps:
      - name: Checkout Sources
        uses: actions/checkout@v2

      - name: Cache Dependencies & Build Outputs
        uses: actions/cache@v2
        with:
          path: ~/.cargo
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

      - name: Install Rust Toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.toolchain }}
          override: true
          components: rustfmt, clippy

      - name: Check Code Format
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check

      - name: Code Lint
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --all-targets --all-features --workspace -- -D warnings

      - name: Code Lint Without Default Features
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --no-default-features --workspace -- -D warnings

      - name: Test
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --all-features --workspace