Skip to content

Commit

Permalink
ci: add test job
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrizio Sestito <[email protected]>
  • Loading branch information
fabriziosestito committed Sep 18, 2024
1 parent 43aaf15 commit e94affd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@ on:
- "*"

jobs:
test:
runs-on: ubuntu-latest
steps:
# Adapted from https://github.com/d3adb5/helm-unittest-action/
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
- name: Install helm-unittest
run: helm plugin install https://github.com/helm-unittest/helm-unittest
- name: Set chart directories to test as environment variable
run: |
echo "CHARTS_TO_TEST=$(find . -type f -name 'Chart.yaml' -exec dirname {} \; | tr '\n' ' ')" >> $GITHUB_ENV
shell: bash
- name: Fetch chart dependencies
run: |
for chart in ${{ env.CHARTS_TO_TEST }}; do
helm dependency update "$chart"
done
shell: bash
- name: Run unit tests
run: helm unittest ${{ env.CHARTS_TO_TEST }}
shell: bash
verify:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit e94affd

Please sign in to comment.