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