-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.18 KB
/
rust_checks.yml
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
40
41
42
43
44
45
46
47
name: Format, Clippy and Tests
on:
push:
branches:
- development
- main
pull_request:
types:
- opened
- reopened
- synchronize
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
format-clippy-test:
name: Format, Clippy and Tests
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly #-2022-11-15 # toolchain
components: clippy, rustfmt
override: true
- run: rustup update
- run: rustup update nightly #-2022-11-15 # toolchain
- run: rustup default nightly #-2022-11-15 # toolchain
- run: rustup default stable
- name: Format
working-directory: ./ftd-backend
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Clippy
working-directory: ./ftd-backend
uses: actions-rs/cargo@v1
with:
toolchain: nightly #-2022-11-15 # toolchain
command: clippy
args: --all-targets -- -D warnings -W clippy::cognitive_complexity