-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.16 KB
/
pull_request.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
54
55
56
57
58
59
60
name: Pull request prechecks
on:
pull_request:
branches: [main]
jobs:
precheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Install Stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Toolchain Info
run: |
rustup 1.25.2 --version
cargo --version --verbose
rustc --version
cargo clippy --version
- name: Conventional Commits
run: |
cargo install --locked cocogitto
cog check --from-latest-tag
- name: Lint
run: |
cargo fmt --check
cargo clippy
- name: Test
run: |
cargo check --locked
cargo test
build:
needs: precheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build Default Target
run: |
cargo build --release