feat(defrag): EtcdDefrag controller #125
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: E2E | |
| on: | |
| # No PR branch filter: PRs in this repo target main as well as integration | |
| # branches (e.g. v1), and the suite must gate all of them. A filter naming | |
| # a branch PRs never target (this said `master`, which does not exist) means | |
| # the workflow never runs at all. | |
| # | |
| # No paths filter on the trigger either: `kamaji-datastore` is a *required* | |
| # status check, and a workflow skipped at the trigger never reports its | |
| # check, leaving the required context stuck in "Expected" — which blocks the | |
| # PR forever (e.g. docs-only PRs). Path filtering instead lives in the | |
| # `changes` job below; a job skipped via `if:` still reports its check as | |
| # "skipped", which branch protection treats as passing. | |
| pull_request: | |
| push: | |
| tags: [ "v*" ] | |
| workflow_dispatch: | |
| concurrency: | |
| group: e2e-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| # Cheap (~seconds, no checkout — dorny uses the PR API) gate that decides | |
| # whether the expensive job below needs to run. PR-only: tag pushes and | |
| # manual dispatch always run the suite unconditionally (see the `if` on | |
| # kamaji-datastore). | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| code: ${{ steps.filter.outputs.code }} | |
| steps: | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| # `code` is true when the PR touches anything the e2e suite | |
| # exercises. Only-negated patterns get an implicit `**`, so this | |
| # reads as "all files except Markdown and docs/**" — i.e. docs-only | |
| # PRs leave `code` false and the ~30-45 min run below is skipped. | |
| filters: | | |
| code: | |
| - '!**/*.md' | |
| - '!docs/**' | |
| kamaji-datastore: | |
| needs: changes | |
| # Always run for tag pushes / manual dispatch; for PRs, run only when | |
| # non-docs files changed. When skipped on a docs-only PR the check still | |
| # reports (as "skipped" = passing), so the PR is not blocked. | |
| if: ${{ github.event_name != 'pull_request' || needs.changes.outputs.code == 'true' }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: e2e (kind + cert-manager + Kamaji) | |
| # Provisions an ephemeral kind cluster, installs cert-manager and | |
| # Kamaji at the versions pinned in hack/e2e.sh, builds the operator | |
| # from this checkout and runs test/e2e — the Kamaji DataStore | |
| # consumer scenario. | |
| # | |
| # On failure, hack/e2e.sh's EXIT trap dumps the cluster state | |
| # (CRs, pods, operator and Kamaji logs) into this step's output | |
| # BEFORE tearing the kind cluster down. Don't add a separate | |
| # dump step here: by the time it would run, the trap has already | |
| # deleted the cluster and every kubectl call would come up empty. | |
| run: make e2e |