-
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (51 loc) · 1.94 KB
/
ci.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
53
name: CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check typos
uses: crate-ci/typos@master
- name: Validate commit messages
run: |
git show-ref
curl -sSfL https://github.com/convco/convco/releases/latest/download/convco-ubuntu.zip | zcat > convco
chmod +x convco
./convco check refs/remotes/origin/master..HEAD
rm convco
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu, wasm32-unknown-unknown
components: rustfmt, clippy
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Check code formatting
run: cargo fmt --all -- --check
- name: Check lints
run: cargo clippy --all-targets --all-features --target x86_64-unknown-linux-gnu -- -W clippy::pedantic -Dwarnings
- name: Check lints wasm
run: cargo clippy --all-targets --all-features --target wasm32-unknown-unknown -- -W clippy::pedantic -Dwarnings
- name: Run cargo-audit
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run msrv
shell: bash
run: |
cargo install cargo-msrv
cargo msrv --target x86_64-unknown-linux-gnu --path crates/core --output-format json verify | tail -n 1 | jq --exit-status '.success'
cargo msrv --target x86_64-unknown-linux-gnu --path crates/macros/form_proc --output-format json verify | tail -n 1 | jq --exit-status '.success'