forked from jenkins-infra/helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (46 loc) · 1.62 KB
/
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
45
46
name: Test Charts
on:
push: null
pull_request: null
workflow_dispatch: null
env:
UNITTEST_VERSION: v0.3.4
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
chart:
- artifact-caching-proxy
- httpredirector
- jenkins-jobs
- jenkins-kubernetes-agents
- mirrorbits
- plugin-health-scoring
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get Tools Versions
id: tools-versions
run: |
current_helm_version="$(curl --silent --location https://raw.githubusercontent.com/jenkins-infra/docker-helmfile/main/Dockerfile | grep 'ARG' | grep 'HELM_VERSION=' | sort -u | cut -d'=' -f2)"
echo "CURRENT_HELM_VERSION=${current_helm_version}" >> $GITHUB_OUTPUT
- name: Set up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3
with:
version: "${{ steps.tools-versions.outputs.CURRENT_HELM_VERSION }}"
- name: install helm unittests
run: |
helm env
# Repeat 2 times to fight against network errors in GHA runners
# Always return true
helm plugin install https://github.com/helm-unittest/helm-unittest --version ${UNITTEST_VERSION} \
|| helm plugin install https://github.com/helm-unittest/helm-unittest --version ${UNITTEST_VERSION} \
|| true
# Fail if not installed
helm plugin list | grep unittest
- name: run unit tests
working-directory: ./charts/
run: |
helm unittest "${{ matrix.chart }}"