Skip to content

Commit

Permalink
test: add testing
Browse files Browse the repository at this point in the history
  • Loading branch information
TrayserCassa committed Jan 6, 2025
1 parent 8ca311a commit bda1687
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,27 @@ jobs:
with:
version: v1.59
args: --timeout=5m --verbose

test-helm:
name: Test Helm Chart
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: debianmaster/actions-k3s@master
id: k3s
with:
version: 'v1.21.2-k3s1'

- name: Build docker images
run: IMG=operator:99.99.99 make docker-build

- name: Generate yaml files
run: |
make helm path=release version=99.99.99
- run: |
k3s ctr images import
kubectl get nodes
cd release
helm template my-test --namespace test . > test.yaml
kubectl wait --namespace test --for=create deployment my-test-shopware-operator --timeout=120s
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes

.PHONY: build
build: manifests generate ## Build manager binary.
go build -o bin/manager cmd/manager.go
go build -o manager cmd/manager.go

.PHONY: run
run: manifests generate zap-pretty ## Run a controller from your host.
Expand All @@ -114,7 +114,8 @@ run: manifests generate zap-pretty ## Run a controller from your host.
# (i.e. docker build --platform linux/arm64). However, you must enable docker buildKit for it.
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
.PHONY: docker-build
docker-build: ## Build docker image with the manager.
docker-build: build ## Build docker image with the manager.
cp LICENSE third-party-licenses.md
$(CONTAINER_TOOL) build . -t ${IMG} -f ./build/Dockerfile

.PHONY: docker-push
Expand Down

0 comments on commit bda1687

Please sign in to comment.