From 8d52dd1bec2640a99066457ea261a3bba0b2e0f7 Mon Sep 17 00:00:00 2001 From: Elliana May Date: Tue, 29 Jun 2021 21:21:11 +0800 Subject: [PATCH] Create rust.yaml --- .github/workflows/rust.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/rust.yaml diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml new file mode 100644 index 00000000..4c38ed12 --- /dev/null +++ b/.github/workflows/rust.yaml @@ -0,0 +1,33 @@ +name: Rust build + +on: push + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + 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 + - name: Cache .cargo + id: cache-primes + uses: actions/cache@v2 + with: + path: ~/.cargo + key: ${{ runner.os }}-${{ hashFiles('Cargo**') }} + - name: Install rust script + uses: actions-rs/cargo@v1 + with: + command: test + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features