-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (35 loc) · 915 Bytes
/
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
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the "main" branch
push:
branches: [ main ]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
fmt:
name: Cargo Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Rust Formatting
run: |
cd lib
cargo fmt -- --check
cd ../cli
cargo fmt -- --check
clippy:
name: Cargo Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Rust Clippy
run: |
cd lib
cargo clippy -- -D warnings
cd ../cli
cargo clippy -- -D warnings