From 40dd29fdaf1d38fc8a0d56d0a361469568a712dd Mon Sep 17 00:00:00 2001 From: holysoles Date: Tue, 28 Jan 2025 22:15:10 -0600 Subject: [PATCH] add minio test cas --- .github/workflows/ci-helm-lint-test.yml | 42 +++++++++++++ charts/pixelfed/test-values/minio-plain.yaml | 62 ++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 charts/pixelfed/test-values/minio-plain.yaml diff --git a/.github/workflows/ci-helm-lint-test.yml b/.github/workflows/ci-helm-lint-test.yml index 5db0841..260f346 100644 --- a/.github/workflows/ci-helm-lint-test.yml +++ b/.github/workflows/ci-helm-lint-test.yml @@ -84,3 +84,45 @@ jobs: ct install \ --target-branch ${{ github.event.repository.default_branch }} \ --helm-extra-set-args "--values ./charts/pixelfed/test-values/postgresql-plain.yaml" + + test_plain_minio: + name: Test chart plain with minio subchart + runs-on: ubuntu-latest + needs: lint + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: "0" + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + + - name: Install Helm + uses: azure/setup-helm@v4 + + - name: Add dependency chart repos + run: | + helm repo add bitnami https://charts.bitnami.com/bitnami + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.7.0 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --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.12.0 + if: steps.list-changed.outputs.changed == 'true' + + - name: Run chart-testing (install) + id: install + if: steps.list-changed.outputs.changed == 'true' + run: | + ct install \ + --target-branch ${{ github.event.repository.default_branch }} \ + --helm-extra-set-args "--values ./charts/pixelfed/test-values/minio-plain.yaml" diff --git a/charts/pixelfed/test-values/minio-plain.yaml b/charts/pixelfed/test-values/minio-plain.yaml new file mode 100644 index 0000000..d35821d --- /dev/null +++ b/charts/pixelfed/test-values/minio-plain.yaml @@ -0,0 +1,62 @@ +# This file is strictly for testing a base functionality of this chart +# it uses postgresql and valkey and provides credentials for them as well as mail + +pixelfed: + app: + domain: "example.com" + mail: + username: test + password: testing1234567 + horizon: + separate_deployment: false + pf: + enable_cloud: true + +valkey: + auth: + enabled: true + password: testing1234567 + primary: + replicaCount: 2 + disableCommands: + - FLUSHALL + persistence: + enabled: false + replica: + replicaCount: 0 + persistence: + enabled: false + +postgresql: + auth: + password: testing1234567 + postgresPassword: testing1234567 + username: pixelfed + database: pixelfed + +minio: + enabled: true + provisioning: + enabled: true + persistence: + enabled: false + +livenessProbe: + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + successThreshold: 1 + httpGet: + path: /api/service/health-check + port: http + +readinessProbe: + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + successThreshold: 1 + httpGet: + path: /api/service/health-check + port: http