Add some CI #34
Workflow file for this run
This file contains hidden or 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: Helm lint and test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| lint-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Helm | |
| uses: azure/[email protected] | |
| with: | |
| version: v3.17.0 | |
| - uses: actions/[email protected] | |
| with: | |
| python-version: "3.x" | |
| check-latest: true | |
| - name: Run helm-docs | |
| uses: losisin/helm-docs-github-action@v1 | |
| with: | |
| fail-on-diff: true | |
| - name: Set up chart-testing | |
| uses: helm/[email protected] | |
| with: | |
| version: 3.14.0 | |
| yamllint_version: 1.37.1 | |
| yamale_version: 6.0.0 | |
| - name: Set up helm repos | |
| run: | | |
| helm repo add groundhog2k https://groundhog2k.github.io/helm-charts/ | |
| - name: Run chart-testing (list-changed) | |
| id: list-changed | |
| run: | | |
| changed=$(ct list-changed --chart-dirs kubernetes/chart --target-branch ${{ github.event.repository.default_branch }}) | |
| if [[ -n "$changed" ]]; then | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Run chart-testing (lint) | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: ct lint --chart-dirs kubernetes/chart --target-branch ${{ github.event.repository.default_branch }} --lint-conf lintconf.yaml --github-groups | |
| - name: Create kind cluster | |
| if: steps.list-changed.outputs.changed == 'true' | |
| uses: helm/kind-action@v1 | |
| - name: Run chart-testing (install) | |
| id: chart-testing-install | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: ct install --chart-dirs kubernetes/chart --target-branch ${{ github.event.repository.default_branch }} --github-groups --skip-clean-up | |
| - name: Fetch logs | |
| if: always() | |
| run: | | |
| namespace=$(helm list --all-namespaces --output json \ | |
| | jq -r '[.[] | select(.namespace | startswith("zulip-"))][0].namespace') | |
| pod=$(kubectl get pods -n "$namespace" -l app.kubernetes.io/name=zulip --output name) | |
| kubectl -n "$namespace" exec -it "$pod" -c zulip -- cat /var/log/zulip/errors.log |