-
Notifications
You must be signed in to change notification settings - Fork 42
44 lines (37 loc) · 1.05 KB
/
unit-test.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
name: UnitTests
on:
pull_request:
branches:
- main
- "[0-9]+.[0-9]+"
- "8.x"
types: [opened, synchronize, reopened]
push:
branches:
- main
- "8.x"
env:
K8S_MANIFEST_DIR: deploy
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
manifest_tests:
name: Manifest Tests
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Get diff k8s manifests
uses: technote-space/get-diff-action@v6
with:
PATTERNS: ${{ env.K8S_MANIFEST_DIR }}/**
- name: Run K8s manifest tests
if: env.GIT_DIFF
uses: stefanprodan/kube-tools@v1
with:
kubectl: 1.18.4
kubeval: v0.16.1
command: |
kubeval --strict -d ${{ env.K8S_MANIFEST_DIR }} --ignore-missing-schemas --ignored-filename-patterns kustomization,kind,patch,cloudbeat,cloudformation,deployment-manager --skip-kinds ClusterConfig