From 1bdca46b4b099a812cc4384fc085cd6b2f6b361f Mon Sep 17 00:00:00 2001 From: EdJoPaTo Date: Fri, 30 Apr 2021 11:01:56 +0200 Subject: [PATCH] ci(actions): improve rust workflow --- .github/workflows/rust.yml | 23 +---------------------- .github/workflows/style.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/style.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9351045..4fc50c1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,4 +1,4 @@ -name: Rust +name: Test Rust on: push: @@ -31,27 +31,6 @@ jobs: 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 }} diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 0000000..993ff10 --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,26 @@ +name: Rust Code Formatting + +on: + push: + pull_request: + +jobs: + rustfmt: + name: Rustfmt + runs-on: ubuntu-latest + 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