From a07cbf178361d54108dce9bb8f9c88afeccb5cb6 Mon Sep 17 00:00:00 2001 From: diogo464 Date: Tue, 8 Feb 2022 09:46:21 +0000 Subject: Update rust.yml --- .github/workflows/rust.yml | 67 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 11 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index acee126..18ac596 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,22 +1,67 @@ name: Rust -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] +on: [push, pull_request] env: CARGO_TERM_COLOR: always jobs: - build: + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + test: + name: Test Suite runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - uses: actions-rs/cargo@v1 + with: + command: test + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Build - run: cargo +nightly build --verbose - - name: Run tests - run: cargo +nightly test --verbose + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - run: rustup component add clippy + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings -- cgit