-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.14 KB
/
ci.yaml
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
name: Continuous integration
on:
workflow_dispatch:
pull_request:
schedule:
- cron: "30 16 * * 5"
env:
CARGO_TERM_COLOR: always
CI: true
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- 1.75.0
k8s:
- v1.26
- latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
name: Setup toolchain
with:
toolchain: ${{ matrix.rust }}
components: rustfmt,clippy
- uses: Swatinem/rust-cache@v2
- name: Fmt
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Build
run: cargo build
- uses: nolar/setup-k3d-k3s@v1
with:
version: ${{matrix.k8s}}
k3d-name: kube
github-token: ${{ secrets.GITHUB_TOKEN }}
k3d-args: "--no-lb --no-rollback --k3s-arg --disable=traefik,servicelb,metrics-server@server:*"
- name: Test
env:
RUST_LOG: kube_lease=debug
run: cargo test --lib --all -- --include-ignored