From 9046617c36229d39493a07c63d369d26b421ee2e Mon Sep 17 00:00:00 2001 From: kotauskas Date: Thu, 30 Apr 2020 10:42:58 +0300 Subject: [PATCH] Add Cargo CI action Runs `cargo check` and `cargo clippy` on the latest nightly. --- .github/workflows/rust.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..7de1dea --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,32 @@ +name: Rust + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + check: + name: cargo check and Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install latest nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + components: rustfmt, clippy + + # `cargo check` command here will use installed `nightly` + # as it is set as an "override" for current directory + + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + - name: Run Clippy + uses: actions-rs/cargo@v1 + with: + command: clippy