-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (39 loc) · 1.06 KB
/
pr.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
name: PR
on:
pull_request:
jobs:
test-server:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
if: ${{ !github.event.pull_request.draft }}
steps:
- uses: colpal/actions-clean@v1
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
key: "1" # increment this to bust the cache if needed
- name: Run cargo test
run: cargo test
lint:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
if: ${{ !github.event.pull_request.draft }}
steps:
- uses: colpal/actions-clean@v1
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
key: "1" # increment this to bust the cache if needed
- name: Run cargo lint
run: cargo lint