File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 37
37
RUNME_PROJECT : ${{ github.workspace }}
38
38
SHELL : bash
39
39
GITHUB_ACTOR : ${{ github.actor }}
40
+ GITHUB_EVENT_NAME : ${{ github.event_name }}
41
+ FORK_OWNER : ${{ github.event.pull_request.head.repo.owner.login }}
42
+ BASE_OWNER : ${{ github.repository_owner }}
40
43
- name : 🔼 Upload Artifacts
41
44
uses : actions/upload-artifact@v4
42
45
if : failure()
Original file line number Diff line number Diff line change @@ -7,19 +7,29 @@ const UI_LATENCY_TIMEOUT_SECS = 2 * 60 * 1000
7
7
8
8
describe ( 'Runme GitHub Workflow Integration' , async ( ) => {
9
9
const notebook = new RunmeNotebook ( )
10
- const token = process . env . RUNME_TEST_TOKEN
10
+ const token = process . env . RUNME_TEST_TOKEN || ''
11
+ const actor = process . env . GITHUB_ACTOR
12
+ const eventName = process . env . GITHUB_EVENT_NAME
13
+ const baseOwner = process . env . BASE_OWNER || ''
14
+ const forkOwner = process . env . FORK_OWNER || ''
11
15
12
16
/**
13
17
* Skip GitHub Action tests for local testing due to missing token
14
18
*/
15
19
if (
16
20
( ! token && ! process . env . CI ) ||
17
21
process . env . NODE_ENV === 'production' ||
18
- process . env . GITHUB_ACTOR === 'dependabot[bot]'
22
+ actor === 'dependabot[bot]'
19
23
) {
20
24
return
21
25
}
22
26
27
+ // Skip tests only if PR is from external fork
28
+ if ( eventName === 'pull_request' && forkOwner !== baseOwner ) {
29
+ console . log ( 'Skipping GitHub Workflow Integration tests for pull request from external fork.' )
30
+ return
31
+ }
32
+
23
33
it ( 'has GitHub test token defined in the environment' , async ( ) => {
24
34
expect ( token ) . toBeDefined ( )
25
35
} )
You can’t perform that action at this time.
0 commit comments