Skip to content

Commit

Permalink
do not run license key checker for external contributions (#1739)
Browse files Browse the repository at this point in the history
  • Loading branch information
motatoes authored Oct 2, 2024
1 parent 876fb40 commit 31c85e3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/libs_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,22 @@ jobs:
- name: Start Azurite service
run: azurite --silent &

- name: Determine if PR is from external contributor
id: pr_check
run: |
if [ "${{ github.event.pull_request.head.repo.full_name }}" = "${{ github.repository }}" ]; then
echo "is_external=false" >> $GITHUB_OUTPUT
else
echo "is_external=true" >> $GITHUB_OUTPUT
fi
- name: Test
run: go test -v ./...
run: |
if [ "${{ steps.pr_check.outputs.is_external }}" = "true" ]; then
go test -v -tags=external ./...
else
go test -v ./...
fi
env:
DIGGER_LICENSE_KEY: ${{ secrets.TEST_DIGGER_LICENSE_KEY}}
working-directory: libs
3 changes: 3 additions & 0 deletions libs/license/license_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// use this to ignore tests from external contributions
//go:build !external

package license

import (
Expand Down

0 comments on commit 31c85e3

Please sign in to comment.