-
-
Notifications
You must be signed in to change notification settings - Fork 44
51 lines (48 loc) · 1.36 KB
/
ci.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
---
name: ci
on:
push:
workflow_dispatch:
permissions:
contents: read
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
# rust: [stable]
rust: ["1.70"]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
steps:
- uses: actions/checkout@v4
# - name: Install Protoc
# uses: arduino/setup-protoc@v1
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
components: clippy
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- uses: taiki-e/install-action@v2
with:
tool: cargo-hack,protoc
- run: cargo hack check --each-feature --no-dev-deps
- run: cargo clippy --workspace --all-features --all-targets -- --deny warnings --allow deprecated --allow unknown-lints
- run: cargo hack test --each-feature -- --test-threads=1