fix replicas count for pod-init #5
Workflow file for this run
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/Test Helm charts | |
on: | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- 'charts/**' | |
jobs: | |
find_directories: | |
name: Find changed helm charts | |
runs-on: ubuntu-latest | |
outputs: | |
directories: ${{ steps.find_directories.outputs.build_matrix }} | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Check out the coredb repo to reuse some actions | |
uses: actions/checkout@v3 | |
with: | |
repository: tembo-io/tembo | |
path: ./.tembo | |
ref: 84664df742ce9774a3029e08111940f9f1fb345e | |
- name: Find directories with Chart.yaml that changed | |
id: find_directories | |
uses: ./.tembo/.github/actions/find-changed-directories | |
with: | |
contains_the_file: Chart.yaml | |
changed_relative_to_branch: ${{ github.base_ref || 'not-a-branch' }} | |
ignore_dirs: ".tembo" | |
lint: | |
name: Lint charts | |
runs-on: ubuntu-latest | |
needs: | |
- find_directories | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.find_directories.outputs.directories) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Helm lint | |
run: helm lint ${{ matrix.path }} | |
lint-ct: | |
name: Lint using chart-testing | |
runs-on: ubuntu-latest | |
needs: | |
- find_directories | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# 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@v4 # | |
with: | |
python-version: 3.x | |
- name: Set up Helm | |
uses: azure/[email protected] | |
with: | |
version: 3.13.2 | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- name: Install just | |
uses: extractions/setup-just@v1 | |
- run: just helm-repo | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --target-branch main) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Run chart-testing linter | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct lint --config ct.yaml | |
test: | |
name: Test using chart-testing | |
runs-on: ubuntu-latest | |
needs: lint-ct | |
# if: needs.lint-ct.outputs.changed == 'true' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/[email protected] | |
with: | |
version: 3.13.2 | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- uses: extractions/setup-just@v1 | |
- run: just helm-repo | |
- name: Install kind cluster | |
uses: helm/[email protected] | |
with: | |
install_only: true | |
- name: Start kind cluster | |
run: just start-kind | |
- name: Run helm chart tests | |
run: ct install --config ct.yaml |