-
-
Notifications
You must be signed in to change notification settings - Fork 21
66 lines (61 loc) · 1.73 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
name: CI
on:
pull_request:
jobs:
cargo-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v1
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: AbsaOSS/k3d-action@v2
with:
cluster-name: "kube"
args: --agents 1 --no-lb
# unit tests
- run: cargo test --lib
# integration tests
- run: cargo build --bin kopium
# Test reasonably complicated CRDs; promethesurules and servicemonitors
- run: just test-pr
- run: just test-sm
# Test a fake CRD with multiple versions
- run: just test-mv
# Test argocd Application
- run: just test-argo
# Test openshift agent crd
- run: just test-agent
# Test around documentation in cert-manager certificates
- run: just test-certmanager
# Test some linkerd crds
- run: just test-linkerd-serverauth
- run: just test-linkerd-server
rustfmt:
name: Run rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Run rustfmt
id: rustfmt
run: rustfmt +nightly --edition 2018 --check $(find . -type f -iname *.rs)
clippy:
name: Run clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features