-
Notifications
You must be signed in to change notification settings - Fork 3
170 lines (157 loc) · 4.34 KB
/
Copy pathci.yml
File metadata and controls
170 lines (157 loc) · 4.34 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
check:
name: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- uses: arduino/setup-protoc@v3
with:
version: '28.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: fmt
run: cargo fmt --all --check
- name: clippy
run: cargo clippy --workspace --features protobuf,grpc,vector -- -D warnings
- name: check
run: cargo check --workspace --features protobuf,grpc,vector
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: arduino/setup-protoc@v3
with:
version: '28.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: build
run: cargo build --workspace --features protobuf,grpc
- name: unit tests
run: cargo test --workspace --features protobuf,grpc --exclude ember-integration-tests
- name: integration tests
run: cargo test -p ember-integration-tests --test integration -- --test-threads=1
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: build release
run: cargo build --release
- name: upload binary
uses: actions/upload-artifact@v4
with:
name: ember-server
path: target/release/ember-server
helm:
name: helm lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: azure/setup-helm@v4
- name: lint
run: helm lint helm/ember
- name: template
run: helm template ember helm/ember
docker:
name: docker build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build
run: docker build -t ember:ci .
go-client:
name: go client
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache-dependency-path: clients/ember-go/go.sum
- name: build
working-directory: clients/ember-go
run: go build ./...
- name: test
working-directory: clients/ember-go
run: go test ./...
msrv:
name: msrv (1.93)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.93'
- uses: Swatinem/rust-cache@v2
- uses: arduino/setup-protoc@v3
with:
version: '28.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: check
run: cargo check --workspace --features protobuf,grpc
python-client:
name: python client
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: install
working-directory: clients/ember-py
run: pip install -e ".[dev]"
- name: test
working-directory: clients/ember-py
run: pytest -v
ts-client:
name: ts client
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
cache-dependency-path: clients/ember-ts/package-lock.json
- name: install
working-directory: clients/ember-ts
run: npm ci
- name: build
working-directory: clients/ember-ts
run: npm run build
proto-drift:
name: client proto drift
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: check clients against canonical proto
run: ./scripts/check-client-drift.sh
security:
name: security
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: install cargo-audit
run: cargo install cargo-audit
- name: audit
run: cargo audit