diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 41c3626f..94286a32 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -44,3 +44,20 @@ jobs: with: command: build args: --manifest-path payjoin-client/Cargo.toml + + fmt: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + rust: [nightly] + + steps: + - uses: actions/checkout@v2 + - uses: Swatinem/rust-cache@v1.2.0 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + override: true + - run: rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu + - run: cargo fmt --all -- --check