From 807f5d7f5e36d79231ba6c02d3b62bfa9b9d6f32 Mon Sep 17 00:00:00 2001 From: Aldo Lacuku Date: Mon, 22 Jan 2024 16:26:37 +0100 Subject: [PATCH] new(k8s-metacollector): enable unit tests Signed-off-by: Aldo Lacuku --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0645d66b0..e9289bb7b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,3 +55,28 @@ jobs: - name: Run chart-testing (install) if: steps.list-changed.outputs.changed == 'true' run: ct install --config ct.yaml + + go-unit-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5 + with: + version: '3.10.3' + + - name: Update repo deps + run: helm dependency update ./charts/falco + + - name: Setup Go + uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + with: + go-version: '1.21' + check-latest: true + + - name: k8s-metacollector unit tests + run: go test ./charts/k8s-metacollector/tests/unit/...