Skip to content

Commit

Permalink
(chore): exec e2e from root
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijith-darshan committed Nov 5, 2024
1 parent 6559835 commit 439aa11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: "E2E Detection"
id: e2es
run: |
scenarios=$(find ${{ github.workspace }}/e2e -type f -name 'e2e_test.go' -exec dirname {} \; | xargs -n 1 basename | jq -R -s -c 'split("\n")[:-1]')
scenarios=$(make list-scenarios)
echo $scenarios
echo "result=$scenarios" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
GREENHOUSE_ADMIN_KUBECONFIG: ${{ steps.config.outputs.admin_config }}
GREENHOUSE_REMOTE_KUBECONFIG: ${{ steps.config.outputs.remote_config }}
GREENHOUSE_REMOTE_INT_KUBECONFIG: ${{ steps.config.outputs.remote_int_config }}
CONTROLLER_LOGS_PATH: ${{github.workspace}}/bin/${{matrix.e2es}}.txt
CONTROLLER_LOGS_PATH: ${{github.workspace}}/bin/${{matrix.e2es}}-${{matrix.k8s-version}}.txt
run: |
go install github.com/onsi/ginkgo/v2/ginkgo@latest
ginkgo version
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,18 @@ e2e-local: prepare-e2e
CONTROLLER_LOGS_PATH="${PWD}/bin/$(SCENARIO)-e2e-pod-logs.txt" \
EXECUTION_ENV=$(EXECUTION_ENV) \
GOMEGA_DEFAULT_EVENTUALLY_TIMEOUT="2m" \
go test -tags="$(SCENARIO)E2E" ${PWD}/e2e/$(SCENARIO) -test.v -ginkgo.v
go test -tags="$(SCENARIO)E2E" ${PWD}/e2e/$(SCENARIO) -test.v -ginkgo.v --ginkgo.junit-report=${PWD}/bin/$(SCENARIO)-e2e-report.xml

.PHONY: prepare-e2e
prepare-e2e:
kind get kubeconfig --name $(ADMIN_CLUSTER) > ${PWD}/bin/$(ADMIN_CLUSTER).kubeconfig
kind get kubeconfig --name $(REMOTE_CLUSTER) > ${PWD}/bin/$(REMOTE_CLUSTER).kubeconfig
kind get kubeconfig --name $(REMOTE_CLUSTER) --internal > ${PWD}/bin/$(REMOTE_CLUSTER)-int.kubeconfig

.PHONY: list-scenarios
list-scenarios:
find ${PWD}/e2e -type f -name 'e2e_test.go' -exec dirname {} \; | xargs -n 1 basename | jq -R -s -c 'split("\n")[:-1]'

.PHONY: dev-docs
dev-docs:
go run -tags="dev" -mod=mod dev-env/localenv/docs.go
Expand Down

0 comments on commit 439aa11

Please sign in to comment.