Skip to content

chore(ontoserver): describe 0.5.2 in artifacthub.io/changes #176

chore(ontoserver): describe 0.5.2 in artifacthub.io/changes

chore(ontoserver): describe 0.5.2 in artifacthub.io/changes #176

Workflow file for this run

name: Unit Tests
on:
# branches: ['**'] rather than a bare `push:` so release tag pushes do not run this
# workflow a second time on top of the branch push that produced them.
push:
branches: ['**']
pull_request:
branches: [master]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
# Pinned so a new plugin release cannot change test-suite parsing behaviour underneath CI.
HELM_UNITTEST_VERSION: 0.8.0
# Pinned so a new generator release cannot reflow the tables underneath CI. Whatever you
# regenerate with locally must use this same version or the drift check will disagree.
README_GENERATOR_VERSION: 2.7.2
# Pinned so a new ct release cannot introduce yamllint/yamale rules that fail CI on
# unchanged charts. Bump deliberately, and re-run `ct lint --config ct.yaml` locally first.
CT_VERSION: 3.14.0
jobs:
# chart-testing adds what `helm lint` alone does not: yamllint over Chart.yaml/values.yaml,
# yamale schema validation of Chart.yaml, and a check that each maintainer resolves to a real
# GitHub account. Config lives in ct.yaml at the repo root so a local run matches this job.
chart-testing:
name: chart-testing (ct lint)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
# ct resolves target-branch from git history; a shallow clone has none.
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v5.0.1
with:
version: v3.18.4
# Also installs the yamllint and yamale that ct shells out to, into a uv-managed venv,
# so no separate actions/setup-python step is needed.
- name: Install chart-testing
uses: helm/chart-testing-action@v2.8.0
with:
version: ${{ env.CT_VERSION }}
- name: Run ct lint
run: ct lint --config ct.yaml
unit-tests:
name: Lint and Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Helm
uses: azure/setup-helm@v5.0.1
with:
version: v3.18.4
- name: Install helm-unittest plugin
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest \
--version "${HELM_UNITTEST_VERSION}"
- name: Build chart dependencies
run: helm dependency build ./charts/ontoserver
- name: Run Helm lint
run: |
helm lint --strict ./charts/ontoserver
helm lint --strict ./charts/ontoserver-extras
helm lint --strict ./charts/ontoserver-indexer
- name: Run unit tests
run: |
helm unittest --strict ./charts/ontoserver
helm unittest --strict ./charts/ontoserver-extras
helm unittest --strict ./charts/ontoserver-indexer
# Every shipped example must render. Chart-level validation (validate-values.yaml) can
# otherwise reject the examples the README tells people to copy, with nothing catching it.
- name: Render all examples
run: |
# git ls-files, not find: only tracked examples are checked, so running this same
# loop locally behaves identically to CI even with untracked scratch files present.
rc=0
render() {
for f in $(git ls-files -- "charts/$1/examples" | grep '\.yaml$'); do
if ! out=$(helm template "$2" "./charts/$1" -f "$f" 2>&1); then
echo "::error file=$f::example failed to render"
echo "$out" | tail -3
rc=1
fi
done
}
render ontoserver rel
render ontoserver-indexer idx
exit $rc
# The `## Parameters` tables are generated from the ## @param annotations in values.yaml.
# They previously went stale for an entire release, so regenerate and fail on any diff.
- name: Check README parameter tables are up to date
run: |
for c in ontoserver ontoserver-extras ontoserver-indexer; do
( cd "charts/$c" && npx --yes \
"@bitnami/readme-generator-for-helm@${README_GENERATOR_VERSION}" \
-v values.yaml -r README.md )
done
if ! git diff --exit-code -- 'charts/*/README.md'; then
echo "::error::README parameter tables are out of date with values.yaml."
echo "Regenerate them and commit the result, from the chart directory:"
echo " cd charts/<chart>"
echo " npx --yes @bitnami/readme-generator-for-helm@${README_GENERATOR_VERSION} -v values.yaml -r README.md"
echo "This edits README.md in place, replacing only the generated parameter tables."
exit 1
fi