Skip to content

Feature/upper layer #376

Feature/upper layer

Feature/upper layer #376

Workflow file for this run

name: KubeCop CI
on:
pull_request:
paths-ignore:
- '**/*.md'
branches:
- main
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '^1.21'
- name: Validate binding CRD is up to date
run: make validate-crd
env:
GO111MODULE: on
- name: Set up Helm
uses: azure/setup-helm@v3
- name: Validate Helm template
run: |
helm template kubecop chart/kubecop --set kubecop.recording.finalizationDuration=120s -f resources/system-tests/kubecop-values.yaml -n kubescape --debug
- name: Validate Namespaced Helm template
run: |
helm template kubecop chart/kubecop --set isNamespaced=true --set isClusterScoped=false --set kubecop.recording.finalizationDuration=120s -f resources/system-tests/kubecop-values.yaml -n kubescape --debug
- name: Run Unit Tests
run: make test
env:
GO111MODULE: on
- name: Print Coverage Report
run: go tool cover -func=coverage.out
- name: Build Project
run: make build
env:
GO111MODULE: on
- name: Build Container Image
run: make build-image
env:
GO111MODULE: on