-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
# $schema: https://json.schemastore.org/github-workflow.json | ||
|
||
name: chainsaw E2E test | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
chainsaw-e2e-tests: | ||
name: Chainsaw E2E test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Chainsaw | ||
uses: kyverno/action-install-chainsaw@v0.2.12 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: './go.mod' | ||
id: go | ||
|
||
- name: extract kubernetes version | ||
if: k8s_version | ||
run: echo "k8s_version=$(go list -m -f '{{.Version}}' k8s.io/kubernetes)" >> $GITHUB_OUTPUT | ||
|
||
- name: Create kind cluster | ||
uses: helm/kind-action@v1 | ||
with: | ||
version: ${{ steps.k8s_version.outputs.k8s_version }} | ||
|
||
- name: Install helm | ||
uses: azure/setup-helm@v4 | ||
|
||
- name: Check chainsaw install | ||
run: chainsaw version | ||
|
||
- name: Check kind cluster install | ||
run: | | ||
kubectl version | ||
K8S_VERSION | ||
kubectl wait --for=jsonpath='{.status.phase}'=Running pod --all -A --timeout 120s | ||
kubectl get pods -A | ||
kubectl get nodes | ||
- name: Check helm version | ||
run: helm version | ||
|
||
- name: run chainsaw | ||
run: chainsaw test chainsaw/* |
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