name: Rust on: push: pull_request: jobs: clippy: name: Clippy ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: - ubuntu-latest - macOS-latest steps: - uses: actions/checkout@v2 - name: Setup Rust uses: actions-rs/toolchain@v1 with: toolchain: stable override: true profile: minimal components: clippy - name: Run clippy uses: actions-rs/cargo@v1 with: command: clippy args: --verbose --all-targets --all-features -- -D clippy::all -D clippy::pedantic rustfmt: name: Rustfmt runs-on: ubuntu-latest continue-on-error: true steps: - uses: actions/checkout@v2 - name: Setup Rust uses: actions-rs/toolchain@v1 with: toolchain: stable override: true profile: minimal components: rustfmt - name: Check format uses: actions-rs/cargo@v1 with: command: fmt args: -- --check --verbose test: name: Test ${{ matrix.os }} ${{ matrix.toolchain }} runs-on: ${{ matrix.os }} needs: clippy strategy: fail-fast: false matrix: os: - ubuntu-latest - macOS-latest toolchain: - stable - nightly steps: - uses: actions/checkout@v2 - name: Setup Rust uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.toolchain }} profile: minimal override: true - name: Run tests uses: actions-rs/cargo@v1 with: command: test args: --verbose --all-features