-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.36 KB
/
lint_fmt_test.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
on:
pull_request:
push:
branches:
- main
name: Format, Lint and Test
jobs:
check:
name: Cargo Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo check --locked
fmt:
name: Formatter Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo fmt --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo clippy --no-deps --locked
check-bump:
name: Check Version Bump
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check if version needs bumped
run: |
if ! git diff Cargo.toml; then
echo "ERROR You forgot to bump the version number in Cargo.toml!!!"
echo "ERROR Edit the version number in Cargo.toml, and then make a `chore:` commit and push it to fix this."
echo "ERROR Make sure you follow SemVer 2.0 when bumping the version number."
exit 1
# Note: This is very rudimentary check, but it is better than nothing.
fi
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo test --locked