lint.yml 1.02 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name:                   Check style

on:
  pull_request:
  push:
    branches:
      - master
    tags:
      - v*
    paths-ignore:
      - '**/README.md'
      - diagrams/*
      - docs/*
  schedule:             # Weekly build
    - cron:             '0 0 * * 0'
jobs:
## Check stage
  check-fmt:
    name:                          Check RustFmt
    runs-on:                       ubuntu-latest
    env:
      RUST_BACKTRACE:   full
    steps:
      - name:           Cancel Previous Runs
        uses:           styfle/cancel-workflow-action@0.4.1
        with:
          access_token: ${{ github.token }}
      - name:           Checkout sources & submodules
        uses:           actions/checkout@master
        with:
          fetch-depth:  5
          submodules:   recursive
      - name:           Add rustfmt
        run:            rustup component add rustfmt
      - name:           rust-fmt check
        uses:           actions-rs/cargo@master
        with:
          command:      fmt
          args:         --all -- --check