mirror of
https://github.com/vee1e/KubeArmor.git
synced 2026-09-02 02:37:27 +00:00
73 lines
2 KiB
YAML
73 lines
2 KiB
YAML
name: ci-test-systemd
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "KubeArmor/**"
|
|
- "tests/**"
|
|
- "protobuf/**"
|
|
- ".github/workflows/ci-test-systemd.yml"
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- "KubeArmor/**"
|
|
- "tests/**"
|
|
- "protobuf/**"
|
|
- ".github/workflows/ci-test-systemd.yml"
|
|
|
|
# Declare default permissions as read only.
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
build:
|
|
name: Test KubeArmor in Systemd Mode
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
with:
|
|
submodules: true
|
|
|
|
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
|
|
with:
|
|
go-version-file: 'KubeArmor/go.mod'
|
|
|
|
- name: Install the latest LLVM toolchain
|
|
run: ./.github/workflows/install-llvm.sh
|
|
|
|
- name: Compile libbpf
|
|
run: ./.github/workflows/install-libbpf.sh
|
|
|
|
- name: Install GoReleaser
|
|
uses: goreleaser/goreleaser-action@b953231f81b8dfd023c58e0854a721e35037f28b # v2
|
|
with:
|
|
install-only: true
|
|
version: v1.25.0
|
|
|
|
- name: Install protoc
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y protobuf-compiler
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.11
|
|
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.6.1
|
|
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Build Systemd Release
|
|
run: make local-release
|
|
working-directory: KubeArmor
|
|
|
|
- name: Install KubeArmor
|
|
run: sudo apt install -y ./dist/kubearmor*amd64.deb
|
|
working-directory: KubeArmor
|
|
|
|
- name: Check journalctl
|
|
run: sudo journalctl -u kubearmor --no-pager
|
|
|
|
- name: Test kubearmor using ginkgo
|
|
run: |
|
|
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
|
|
make
|
|
working-directory: ./tests/nonk8s_env
|
|
timeout-minutes: 30
|
|
|
|
|