Skip to content

Commit 6c26b53

Browse files
authored
skip external pr for libs test (#2288)
1 parent 2fc2ce4 commit 6c26b53

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.github/workflows/libs_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
- name: Test
6161
run: |
6262
if [ "${{ steps.pr_check.outputs.is_external }}" = "true" ]; then
63+
export IS_EXTERNAL_PR="true"
6364
go test ./...
6465
else
6566
go test ./...

libs/license/license_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ package license
55

66
import (
77
"github.com/stretchr/testify/assert"
8+
"os"
89
"testing"
910
)
1011

1112
func TestLicenseKeyChecker(t *testing.T) {
13+
if os.Getenv("IS_EXTERNAL_PR") == "true" {
14+
t.Skip("External PRs are not allowed to run license tests")
15+
}
1216
err := LicenseKeyChecker{}.Check()
1317
assert.NoError(t, err)
1418
}

0 commit comments

Comments
 (0)