summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorWez Furlong <wez@wezfurlong.org>2024-06-09 05:45:23 -0700
committerWez Furlong <wez@wezfurlong.org>2024-06-09 05:46:52 -0700
commita0e636635f0d8feb23ee377be7987ab34edec35e (patch)
tree8291cb91f720f0d15d2bf1bf8bb037f7b4311bcf /.github/workflows
parent85492ff8caac63359a8051318fa263facf6ae370 (diff)
add in my preferred rustfmt options
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/fmt.yml26
1 files changed, 26 insertions, 0 deletions
diff --git a/.github/workflows/fmt.yml b/.github/workflows/fmt.yml
new file mode 100644
index 0000000..40b1738
--- /dev/null
+++ b/.github/workflows/fmt.yml
@@ -0,0 +1,26 @@
+name: fmt
+
+on:
+ push:
+ branches: [ "main" ]
+ pull_request:
+ branches: [ "main" ]
+
+env:
+ CARGO_TERM_COLOR: always
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: "Install Rust"
+ uses: dtolnay/rust-toolchain@nightly
+ with:
+ components: rustfmt
+ - name: Check formatting
+ run: |
+ source $HOME/.cargo/env
+ cargo +nightly fmt --all -- --check
+
+