-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TIKA-4232 Create and execute unit tests for tika-helm
- Loading branch information
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |