-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (48 loc) · 1.23 KB
/
ci.yaml
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
name: CI
env:
CARGO_TERM_COLOR: always
on:
push:
branches:
- dev-1.x
- master
pull_request: {}
permissions:
contents: read
jobs:
test-windows:
name: Test Windows
runs-on: windows-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --lib --tests --all --all-features
build-and-test-linux:
name: Build and test Linux
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --all --all-features
- name: Test
run: cargo test --lib --tests --all --all-features
check:
name: Check formatting and clippy
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@protoc
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check
run: cargo clippy --all --all-features -- -W clippy::pedantic
- name: rustfmt
run: cargo fmt --all --check