Explorar o código

CI: add lint workflow

Alessandro Decina %!s(int64=3) %!d(string=hai) anos
pai
achega
be035bf42c
Modificáronse 1 ficheiros con 30 adicións e 0 borrados
  1. 30 0
      .github/workflows/lint.yml

+ 30 - 0
.github/workflows/lint.yml

@@ -0,0 +1,30 @@
+name: Lint
+
+on:
+  push:
+    branches:
+      - main
+      - ci
+
+  pull_request:
+    branches:
+      - main
+
+env:
+  CARGO_TERM_COLOR: always
+
+jobs:
+  build:
+    runs-on: ubuntu-20.04
+
+    steps:
+      - uses: actions/checkout@v2
+
+      - uses: actions-rs/toolchain@v1
+        with:
+          profile: minimal
+          toolchain: nightly
+          components: rustfmt, clippy
+
+      - name: Check formatting
+        run: cargo +nightly fmt --all -- --check