Update dependencies and rework all charts #39
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: Tests | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
helm: v3.16.2 | |
python-version: 3.x | |
jobs: | |
linter: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v4 | |
with: | |
version: ${{ env.helm }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.python-version }} | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2 | |
- name: Run chart-testing (lint) | |
run: ct lint --config ct.yaml --target-branch ${{ github.event.repository.default_branch }} | |
helm-tests: | |
runs-on: ubuntu-latest | |
name: Helm tests (${{ matrix.test_cases.name }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
test_cases: | |
# test the plain helm chart with nothing changed | |
- name: 'Default - no custom values' | |
# test the helm chart with postgresql subchart enabled | |
- name: PostgreSQL enabled | |
helm_args: '--helm-extra-set-args "--set=postgresql.enabled=true --set=internalDatabase.enabled=false"' | |
# test the helm chart with mariadb subchart enabled | |
- name: Mariadb enabled | |
helm_args: '--helm-extra-set-args "--set=mariadb.enabled=true --set=internalDatabase.enabled=false"' | |
# test the helm chart with all options | |
- name: Redis and queue enabled | |
helm_args: '--helm-extra-set-args "--set=mariadb.enabled=true --set=internalDatabase.enabled=false --set=monica.cacheStore=memcached --set=monica.queueConnection=redis --set=redis.enabled=true --set=memcached.enabled=true --set=cronjob.enabled=true --set=queue.enabled=true"' | |
# test the helm chart with horizontal pod autoscaling enabled | |
- name: Horizontal Pod Autoscaling enabled | |
helm_args: '--helm-extra-set-args "--set=hpa.enabled=true --set=hpa.minPods=2 --set=hpa.maxPods=3 --set=hpa.targetCPUUtilizationPercentage=75"' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v4 | |
with: | |
version: ${{ env.helm }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.python-version }} | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2 | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --config ct.yaml --target-branch ${{ github.event.repository.default_branch }}) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Create kind cluster | |
uses: helm/kind-action@v1 | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Run chart-testing (install) | |
run: ct install --config ct.yaml --helm-extra-args '--timeout 600s' --target-branch ${{ github.event.repository.default_branch }} ${{ matrix.test_cases.helm_args }} |