-
-
Notifications
You must be signed in to change notification settings - Fork 7
43 lines (40 loc) · 1.06 KB
/
main.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
# Jobs run on pull request
name: CI main
on:
workflow_dispatch:
push:
branches:
- main
env:
RUST_LOG: info
RUST_BACKTRACE: 1
jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install toolchain
uses: moonrepo/setup-rust@b8edcc56aab474d90c7cf0bb8beeaf8334c15e9f # v1
with:
components: rustfmt
bins: taplo-cli
cache-base: main
- name: Run format
run: |
cargo fmt --all --check
taplo format --check
lint:
name: Lint Rust Files
runs-on: ubuntu-latest
steps:
- name: Checkout PR Branch
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install toolchain
uses: moonrepo/setup-rust@b8edcc56aab474d90c7cf0bb8beeaf8334c15e9f # v1
with:
components: clippy
cache-base: main
- name: Run clippy
run: cargo clippy --all-targets -- --deny warnings