-
Notifications
You must be signed in to change notification settings - Fork 1
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
3 changed files
with
89 additions
and
5 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
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,57 @@ | ||
name: End2End Testing | ||
on: [push] | ||
|
||
jobs: | ||
end2end: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Set up K3S | ||
uses: debianmaster/actions-k3s@master | ||
id: k3s | ||
with: | ||
version: 'v1.24.8-k3s1' | ||
- name: Check Cluster | ||
run: | | ||
kubectl get nodes | ||
- name: Setup Helm | ||
run: | | ||
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash | ||
helm version | ||
- name: Install Cosignwebhook | ||
run: | | ||
helm -n cosignwebhook upgrade -i cosignwebhook \ | ||
--atomic \ | ||
--create-namespace \ | ||
--timeout 300s \ | ||
--set logLevel.info=debug chart | ||
- name: Check Pods | ||
run: | | ||
kubectl -n cosignwebhook get pods | ||
- name: Check Cosignwebhook Deployment | ||
run: | | ||
kubectl -n cosignwebhook wait --for=condition=available deployment/cosignwebhook | ||
STATUS=$(kubectl -n cosignwebhook get deployment cosignwebhook -o jsonpath={.status.readyReplicas}) | ||
if [[ $STATUS -ne 1 ]] | ||
then | ||
echo "Deployment cosignwebhook not ready" | ||
kubectl -n cosignwebhook get events | ||
exit 1 | ||
else | ||
echo "Deployment cosignwebhook OK" | ||
fi | ||
- name: Deploy Demoapp | ||
run: | | ||
kubectl create namespace demoapp | ||
kubectl -n demoapp apply -f manifests/demoapp.yaml | ||
kubectl -n demoapp wait --for=condition=available deployment/demoapp | ||
STATUS=$(kubectl -n demoapp get deployment demoapp -o jsonpath={.status.readyReplicas}) | ||
if [[ $STATUS -ne 1 ]] | ||
then | ||
echo "Deployment demoapp not ready" | ||
kubectl -n demoapp get events | ||
exit 1 | ||
else | ||
echo "Deployment demoapp OK" | ||
fi |
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,25 @@ | ||
name: Go package | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.21 | ||
|
||
- name: Mod Tidy | ||
run: go mod tidy | ||
|
||
- name: Mod Vendor | ||
run: go mod vendor | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
|