-
Notifications
You must be signed in to change notification settings - Fork 45
109 lines (95 loc) · 2.95 KB
/
ci.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
on:
push:
branches:
- main
pull_request:
name: ci
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install protobuf
run: sudo apt-get -y install protobuf-compiler
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
toolchain: 1.82.0
- name: Install toolchain (nightly)
run: rustup toolchain add nightly --component rustfmt --profile minimal
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: "nightly-fe2acca4e379793539db80e032d76ffe0110298b"
# Build to generate the ABI bindings.
- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --all --all-features
- name: cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --all --all-features
- name: cargo +nightly fmt
uses: actions-rs/cargo@v1
with:
command: fmt
toolchain: nightly
args: --all --check
- name: cargo clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --all-features --tests -- -D warnings
- name: buf setup
uses: bufbuild/buf-setup-action@v1
- name: buf lint
uses: bufbuild/buf-lint-action@v1
doc-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install codespell
run: sudo pip3 install codespell tomli
- name: Check spelling
run: codespell --toml .github/workflows/codespell.toml *.md docs/*.md
- name: markdown link check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
folder-path: "docs"
file-path: "README.md,CONTRIBUTING.md,SECURITY.md"
config-file: ".github/workflows/mlc_config.json"
cargo-sort:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install cargo-sort
run: cargo install --git=https://github.com/DevinR528/cargo-sort --rev=55ec89082466f6bb246d870a8d56d166a8e1f08b cargo-sort
- name: Check cargo sort
run: cargo sort -g -w -c
cog_check_job:
runs-on: ubuntu-latest
name: check conventional commit compliance
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# pick the pr HEAD instead of the merge commit
ref: ${{ github.event.pull_request.head.sha }}
- name: Conventional commit check
uses: cocogitto/cocogitto-action@v3
with:
check-latest-tag-only: true