name: Runs E2E Tests description: Runs E2E tests using chainsaw inputs: k8s-version: description: Kubernetes version required: true kind-config: description: Kind cluster config default: ./scripts/config/kind/default.yaml kyverno-configs: description: Kyverno configs default: standard token: description: GH token required: true chainsaw-config: description: Chainsaw config default: ../../../.chainsaw.yaml tests-path: description: Tests path default: '.' chainsaw-tests: description: Test regex default: '' shard-index: description: Shard index default: '0' shard-count: description: Shard count default: '0' runs: using: composite steps: # install tools - name: Install helm id: helm uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 - name: Install Cosign uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0 - name: Install chainsaw uses: kyverno/action-install-chainsaw@d311eacde764f806c9658574ff64c9c3b21f8397 # v0.2.11 with: verify: true # create cluster - name: Create kind cluster uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0 with: node_image: kindest/node:${{ inputs.k8s-version }} cluster_name: kind config: ${{ inputs.kind-config }} # deploy kyverno - name: Download kyverno images archive uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: kyverno.tar - name: Load kyverno images archive in kind cluster shell: bash run: | set -e kind load image-archive kyverno.tar --name kind - name: Install kyverno shell: bash run: | set -e export HELM=${{ steps.helm.outputs.helm-path }} export USE_CONFIG=${{ inputs.kyverno-configs }} make kind-install-kyverno - name: Wait for kyverno ready uses: ./.github/actions/kyverno-wait-ready # run tests - name: Test with Chainsaw shell: bash env: GITHUB_TOKEN: ${{ inputs.token }} run: | set -e cd ./test/conformance/chainsaw chainsaw test ${{ inputs.tests-path }} \ --config ${{ inputs.chainsaw-config }} \ --include-test-regex '^chainsaw$/${{ inputs.chainsaw-tests }}' \ --shard-index ${{ inputs.shard-index }} \ --shard-count ${{ inputs.shard-count }} # debug - name: Debug failure if: failure() uses: ./.github/actions/kyverno-logs