-
Notifications
You must be signed in to change notification settings - Fork 10
99 lines (91 loc) · 2.77 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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Continuous integration
on:
pull_request:
push:
branches:
- main
jobs:
cargo-deny: # only runs on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: EmbarkStudios/cargo-deny-action@v1
check:
name: Check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions-rust-lang/[email protected]
- name: Install protobuf (Apt)
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
if: matrix.os == 'ubuntu-latest'
- name: Install protobuf (Brew)
run: brew install protobuf
if: matrix.os == 'macos-latest'
- run: cargo check
fmt:
name: Rustfmt
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions-rust-lang/[email protected]
with:
components: rustfmt
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
clippy_check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/[email protected]
with:
components: clippy
- name: Install protobuf (Apt)
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
if: matrix.os == 'ubuntu-latest'
- name: Install protobuf (Brew)
run: brew install protobuf
if: matrix.os == 'macos-latest'
- run: cargo clippy --all-features
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rust-lang/[email protected]
- name: Install protobuf (Apt)
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- run: cargo test
integration-test:
name: Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rust-lang/[email protected]
- name: Install protobuf (Apt)
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- run: cargo test -p sheepdog
timeout-minutes: 30
buf:
runs-on: ubuntu-latest
steps:
# Check our protobufs for lint cleanliness and for lack of breaking
# changes
- uses: actions/checkout@v3
- name: buf-setup
uses: bufbuild/[email protected]
- name: buf-lint
uses: bufbuild/[email protected]
- name: buf-breaking
uses: bufbuild/[email protected]
with:
against: 'https://github.com/datadog/lading.git#branch=main'