Skip to content

Commit adbd678

Browse files
committed
Merge branch 'master' of https://github.com/alchezar/zero2prod
2 parents 6c3655e + b5d62a5 commit adbd678

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Rust
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
8+
jobs:
9+
test:
10+
name: Test
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: dtolnay/rust-toolchain@stable
15+
- uses: Swatinem/rust-cache@v2
16+
- name: Run tests
17+
run: cargo test
18+
19+
fmt:
20+
name: Rustfmt
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: dtolnay/rust-toolchain@stable
25+
with:
26+
components: rustfmt
27+
- name: Enforce formatting
28+
run: cargo fmt --check
29+
30+
clippy:
31+
name: Clippy
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
- uses: dtolnay/rust-toolchain@stable
36+
with:
37+
components: clippy
38+
- uses: Swatinem/rust-cache@v2
39+
- name: Linting
40+
run: cargo clippy -- -D warnings
41+
42+
coverage:
43+
name: Code coverage
44+
runs-on: ubuntu-latest
45+
container:
46+
image: xd009642/tarpaulin
47+
options: --security-opt seccomp=unconfined
48+
steps:
49+
- name: Checkout repository
50+
uses: actions/checkout@v3
51+
- name: Generate code coverage
52+
run: |
53+
cargo tarpaulin --verbose --workspace

0 commit comments

Comments
 (0)