-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (72 loc) · 2.42 KB
/
Copy pathci-reusable.yml
File metadata and controls
75 lines (72 loc) · 2.42 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
---
name: Reusable CI workflow
on:
workflow_call:
permissions:
contents: read
jobs:
helm-chart:
name: Run the helm chart
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Helm
uses: azure/setup-helm@v5.0.1
- uses: actions/setup-python@v6.3.0
with:
python-version: '3.x'
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.8.0
- name: Install kind
uses: helm/kind-action@v1.12.0
with:
install_only: true
version: v0.32.0
- uses: extractions/setup-just@v3
- name: Install kubeconform
run: |
curl -sSL https://github.com/yannh/kubeconform/releases/download/v0.8.0/kubeconform-linux-amd64.tar.gz | \
tar xz -C /usr/local/bin kubeconform
- name: Run kubeconform
run: |
helm template rustik charts/cmk-rustik | \
kubeconform -strict -summary -kubernetes-version 1.36.0 -
- name: Run chart-testing (lint)
run: ct lint --all
# The install test uses the dev images: they skip the (slow, in-Docker)
# Rust build and instead run the binaries from the /src mount, exactly
# like the local dev env. This job tests the *chart*; the production
# images are built (with caching) by the images workflow.
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
target: x86_64-unknown-linux-musl
- name: Install musl C toolchain
run: sudo apt update && sudo apt install -y musl-tools
- name: Build binaries for the /src mount
run: cargo build
- name: Prepare kind (create cluster, build and load docker images)
run: just kind-load
- name: Run chart-testing (install)
run: ct install --all
ci:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy, rustfmt
rustflags: ""
target: x86_64-unknown-linux-musl
- run: sudo apt update && sudo apt install -y musl-tools
if: always()
- run: cargo test --all-features
if: always()
- run: cargo fmt --check
if: always()
- run: cargo clippy --lib --bins
if: always()
- run: cargo build --release --all-features
if: always()