Skip to content

Commit

Permalink
test: Split of GH oncluster tests by builder. Added FUNC_BUILDER env …
Browse files Browse the repository at this point in the history
…var for e2e oncluter tests (knative#1963)
  • Loading branch information
jrangelramos authored and matejvasek committed Sep 27, 2023
1 parent 7785758 commit 6047143
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-e2e-oncluster-runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
matrix:
go: [1.20.2]
os: ["ubuntu-latest"]
func_builder: ["pack", "s2i"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -31,6 +32,7 @@ jobs:
TEST_TAGS: runtime
FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }}
FUNC_REPO_BRANCH_REF: ${{ github.head_ref }}
FUNC_BUILDER: ${{ matrix.func_builder }}
run: make test-e2e-on-cluster
- uses: codecov/codecov-action@v3
with:
Expand Down
9 changes: 6 additions & 3 deletions test/oncluster/scenario_runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestRuntime(t *testing.T) {

var runtimeList = []string{}
runtimes, present := os.LookupEnv("E2E_RUNTIMES")
targetBuilder, _ := os.LookupEnv("FUNC_BUILDER")

if present {
if runtimes != "" {
Expand All @@ -41,9 +42,11 @@ func TestRuntime(t *testing.T) {

for _, lang := range runtimeList {
for _, builder := range runtimeSupportMap[lang] {
t.Run(fmt.Sprintf("%v_%v_test", lang, builder), func(t *testing.T) {
runtimeImpl(t, lang, builder)
})
if targetBuilder == "" || builder == targetBuilder {
t.Run(fmt.Sprintf("%v_%v_test", lang, builder), func(t *testing.T) {
runtimeImpl(t, lang, builder)
})
}
}
}

Expand Down

0 comments on commit 6047143

Please sign in to comment.