Skip to content

Commit

Permalink
TIKA-4232 Create and execute unit tests for tika-helm
Browse files Browse the repository at this point in the history
  • Loading branch information
lewismc committed May 9, 2024
1 parent a65b7cd commit c3eec9d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,39 @@ jobs:
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
shell: bash
- name: Run chart-testing (lint)
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --charts .
shell: bash
- name: Create kind cluster
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'
- name: Uninstall helm-unittest if present
run: |
helm plugin uninstall unittest >/dev/null 2>/dev/null \
|| echo "Failed to uninstall plugin, assuming it's not present."
shell: bash
- name: Install latest helm-unittest
run: |
echo "Installing latest version of helm-unittest"
helm plugin install https://github.com/helm-unittest/helm-unittest >/dev/null 2>/dev/null
shell: bash
- name: Assemble list of chart directories to test
run: |
tr ' ' '\n' <<< . | grep -v '^$' > charts-to-test || true
find . -type f -name 'Chart.yaml' -exec dirname {} \; > all-charts
[ -z . ] && mv all-charts charts-to-test || true
shell: bash
- name: Fetch chart dependencies
run: |
for chart in $(cat charts-to-test); do
helm dependency update "$chart" >/dev/null
done
shell: bash
- name: Run unit tests
uses: d3adb5/helm-unittest-action@v2
run: helm unittest --color $(cat charts-to-test)
shell: bash
- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --target-branch ${{ github.event.repository.default_branch }} --charts .
if: steps.list-changed.outputs.changed == 'true'
shell: bash
2 changes: 2 additions & 0 deletions .github/workflows/pluto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ jobs:
wget https://github.com/FairwindsOps/pluto/releases/download/v${{ env.PLUTO_VERSION }}/pluto_${{ env.PLUTO_VERSION }}_linux_amd64.tar.gz -O - | tar -xz
mv pluto /usr/local/bin/pluto
chmod +x /usr/local/bin/pluto
shell: bash
- name: Set up Helm
uses: azure/[email protected]
- name: verify helm chart
run: |
helm template . | pluto detect -omarkdown - >> $GITHUB_STEP_SUMMARY
shell: bash

0 comments on commit c3eec9d

Please sign in to comment.