docs: tweak readme #73
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
name: Lint and Test Charts | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
uncomitted: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
- name: Ensure JSON schema is up-to-date from YAML | |
run: | | |
python3 -c 'import sys, yaml, json; print(json.dumps(yaml.safe_load(sys.stdin), indent=2))' < charts/trustify/values.schema.yaml > charts/trustify/values.schema.json | |
if ! git diff --quiet; then | |
echo "::error::Uncommitted changes (update the JSON schema after making YAML changes)" | |
exit 1 | |
fi | |
lint-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v4.2.0 | |
with: | |
version: v3.13.3 | |
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and | |
# yamllint (https://github.com/adrienverge/yamllint) which require Python | |
- name: Set up Python | |
uses: actions/setup-python@v5.3.0 | |
with: | |
python-version: 3.x | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2.6.1 | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --config .github/ct.yaml) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Run chart-testing (lint) | |
run: ct lint --config .github/ct.yaml --all |