-
Notifications
You must be signed in to change notification settings - Fork 14
57 lines (57 loc) · 1.53 KB
/
lint.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
48
49
50
51
52
53
54
55
56
57
name: Lint
on:
- push
jobs:
rust:
container: rust:1.72.1-bullseye
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.72.1
default: true
components: clippy
- name: Install nightly Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
- name: Check code for errors
uses: actions-rs/cargo@v1
with:
command: check
args: --color always --lib --release
- name: Check code formatting
uses: actions-rs/cargo@v1
with:
command: fmt
toolchain: nightly
args: -- --check --color always
- name: Run Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: >
--color always --lib --release
--
--allow unknown-lints
--deny clippy::unused_async
--deny clippy::wildcard_imports
--deny clippy::unwrap_used
--deny warnings
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install linters
run: python3 -m pip install black mypy types-requests
- name: Run black
run: black --check --diff test/
- name: Run mypy
run: mypy test/