-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (47 loc) · 1.12 KB
/
pr.yml
File metadata and controls
47 lines (47 loc) · 1.12 KB
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
name: Pull Request
on:
pull_request:
branches:
- main
types:
- opened
- edited
- synchronize
jobs:
pr-title:
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
lint:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Run clippy
uses: giraffate/clippy-action@v1
with:
reporter: github-pr-check
github_token: ${{ secrets.GITHUB_TOKEN }}
clippy_flags: --all-targets --all-features
- name: Run rustfmt
run: cargo fmt --all -- --check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run Tests
run: |
cargo test --verbose
build:
uses: ./.github/workflows/build.yml