From 99a238107bf41d40cb64031ff135c6fb96f95f81 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 11 Jan 2024 21:20:26 +0800 Subject: [PATCH] add a proposed rustfmt check --- .github/workflows/rustfmt_check.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/rustfmt_check.yml diff --git a/.github/workflows/rustfmt_check.yml b/.github/workflows/rustfmt_check.yml new file mode 100644 index 000000000..1d0d4e52c --- /dev/null +++ b/.github/workflows/rustfmt_check.yml @@ -0,0 +1,19 @@ +# From https://github.com/samblenny/autofmt-demo/blob/main/.github/workflows/rustfmt_check.yml +name: rustfmt_check +on: push +jobs: + rustfmt_check: + runs-on: ubuntu-latest + steps: + - name: Check out branch source + uses: actions/checkout@v4 + + - name: Install rustfmt from nightly toolchain + run: | + rustup toolchain install nightly + rustup component add rustfmt --toolchain nightly + + - name: Run cargo +nightly fmt --check + run: cargo +nightly fmt --check + + - run: echo "status = ${{ job.status }}" \ No newline at end of file