-
Notifications
You must be signed in to change notification settings - Fork 60
39 lines (30 loc) · 844 Bytes
/
pr.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
name: pr
on:
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Install Rust with clippy/rustfmt
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy, rustfmt
# Make sure u guys don't write bad code
- run: cargo test --verbose
- run: cargo clippy --no-deps
- run: cargo fmt --check
# Check for unused dependencies
- uses: bnjbvr/cargo-machete@main
# Check for semvar violations
- uses: obi1kenobi/cargo-semver-checks-action@v2
with:
exclude: moq-sub
# Used to publish any new crates
- uses: katyo/publish-crates@v2
with:
dry-run: true
ignore-unpublished-changes: true