-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (61 loc) · 1.48 KB
/
Copy pathci.yml
File metadata and controls
77 lines (61 loc) · 1.48 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
pull-requests: write
env:
CARGO_TERM_COLOR: always
jobs:
proto:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: bufbuild/buf-action@v1
with:
lint: true
format: true
breaking: true
push: false
pr_comment: true
rust:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: true
toolchain: stable
components: rustfmt, clippy
- uses: bufbuild/buf-action@v1
with:
setup_only: true
- name: Check Formatting
run: cargo fmt --check
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose
- name: Clippy
run: cargo clippy -- -D warnings
nix:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Check Flake Metadata
run: nix flake check
- name: Verify rust DevShell
run: nix develop --command cargo version
- name: Verify buf DevShell
run: nix develop --command buf --version
- name: Nix Format Check
run: nix fmt -- --check .