aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/lint.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/lint.yml')
-rw-r--r--.github/workflows/lint.yml24
1 files changed, 24 insertions, 0 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 0000000..85c8a17
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,24 @@
+on: [push, pull_request]
+
+name: rustfmt and clippy
+
+jobs:
+ clippy:
+ name: Clippy
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: nightly
+ override: true
+ components: rustfmt, clippy
+ - uses: actions-rs/cargo@v1
+ with:
+ command: fmt
+ args: --all -- --check
+ - uses: actions-rs/cargo@v1
+ with:
+ command: clippy
+ args: -- -D warnings \ No newline at end of file