-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 960 Bytes
/
do-checks.yaml
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
name: Do Checks
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
check_formatting:
runs-on: ubuntu-latest
name: Check formatting
steps:
- uses: actions/checkout@v2
- name: Prepare toolchain
run: rustup toolchain install nightly
- name: Install formatter
run: rustup component add rustfmt --toolchain nightly
- name: Check codebase
run: cargo +nightly fmt --all -- --check && echo "All files matching configured formatting rules"
lint_sources:
runs-on: ubuntu-latest
name: Lint sources
steps:
- uses: actions/checkout@v2
- name: Prepare toolchain
run: rustup toolchain install nightly
- name: Install linter
run: rustup component add clippy --toolchain nightly
- name: Check codebase
run: cargo +nightly clippy --all -- && echo "All files matching configured linting rules"