Skip to content

Commit

Permalink
chore(gh): junit report
Browse files Browse the repository at this point in the history
  • Loading branch information
prometherion committed May 25, 2023
1 parent 841c18b commit bb4f16f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,8 @@ jobs:
version: 3.3.4
- name: e2e testing
run: make e2e/${{ matrix.k8s-version }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure()
with:
report_paths: 'e2e/junit.xml'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ bin
.DS_Store
*.tgz
kind.yaml
e2e/junit.xml
13 changes: 8 additions & 5 deletions e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
package e2e

import (
"os"
"path"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -27,18 +29,19 @@ import (
// http://onsi.github.io/ginkgo/ to learn more about Ginkgo.

var (
cfg *rest.Config
k8sClient client.Client
testEnv *envtest.Environment
tenantRoleBindingNames = []string{"namespace:admin", "namespace-deleter"}
cfg *rest.Config
k8sClient client.Client
testEnv *envtest.Environment
)

func TestAPIs(t *testing.T) {
p, _ := os.Getwd()

RegisterFailHandler(Fail)

RunSpecsWithDefaultAndCustomReporters(t,
"Controller Suite",
[]Reporter{&reporters.JUnitReporter{}})
[]Reporter{reporters.NewJUnitReporter(path.Join(p, "junit.xml"))})
}

var _ = BeforeSuite(func(done Done) {
Expand Down

0 comments on commit bb4f16f

Please sign in to comment.