Skip to content

Commit 27a6672

Browse files
author
Ulises Himely
committed
add code quality github action
1 parent 5b9bd32 commit 27a6672

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/code-quality.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Rust
2+
3+
on: [pull_request]
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
ENVIRONMENT: development
8+
9+
jobs:
10+
test:
11+
name: Test
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions-rs/toolchain@v1
16+
with:
17+
profile: minimal
18+
toolchain: stable
19+
override: true
20+
- uses: actions-rs/cargo@v1
21+
with:
22+
command: test
23+
24+
fmt:
25+
name: Rustfmt
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v2
29+
- uses: actions-rs/toolchain@v1
30+
with:
31+
toolchain: stable
32+
override: true
33+
components: rustfmt
34+
- uses: actions-rs/cargo@v1
35+
with:
36+
command: fmt
37+
args: --all -- --check
38+
39+
clippy:
40+
name: Clippy
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v2
44+
- uses: actions-rs/toolchain@v1
45+
with:
46+
toolchain: stable
47+
override: true
48+
components: clippy
49+
- uses: actions-rs/clippy-check@v1
50+
with:
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
args: -- -D warnings

0 commit comments

Comments
 (0)