on: [pull_request] name: CI jobs: test: name: fmt, clippy, test, test --release runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Install LLVM run: sudo ./ci/install-llvm.sh 8 - uses: actions-rs/toolchain@v1 name: Install Rust Toolchain with: profile: minimal toolchain: stable override: true - run: rustup component add rustfmt - name: Cache cargo registry uses: actions/cache@v1 with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index uses: actions/cache@v1 with: path: ~/.cargo/git key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - uses: actions-rs/cargo@v1 name: cargo fmt --check with: command: fmt args: --all -- --check - run: rustup component add clippy - uses: actions-rs/cargo@v1 name: cargo clippy with: command: clippy args: -- -D warnings - uses: actions-rs/cargo@v1 name: cargo test with: command: test - uses: actions-rs/cargo@v1 name: cargo test --release with: command: test args: --release