Skip to content

Commit 2516357

Browse files
authored
CI - Skip Internal Tests and Unreal Tests on external PRs (#3522)
# Description of Changes These tests fail on external PRs, but not for any real reasons - just because GH secrets are missing. "Skipped" is more informative than "failed". # API and ABI breaking changes None. # Expected complexity level and risk 1 # Testing None, but I just copied the logic from the unity testsuite. --------- Co-authored-by: Zeke Foppa <[email protected]>
1 parent b69e776 commit 2516357

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ jobs:
277277
# This can't go on e.g. ubuntu-latest because that runner runs out of disk space. ChatGPT suggested that the general solution tends to be to use
278278
# a custom runner.
279279
runs-on: spacetimedb-runner
280+
# Skip if this is an external contribution. GitHub secrets will be empty, so the step would fail anyway.
281+
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }}
280282
container:
281283
image: ghcr.io/epicgames/unreal-engine:dev-5.6
282284
credentials:

.github/workflows/csharp-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,4 @@ jobs:
173173
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
174174
# Skip if this is an external contribution.
175175
# The license secrets will be empty, so the step would fail anyway.
176-
if: ${{ !github.event.pull_request.head.repo.fork }}
176+
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }}

.github/workflows/internal-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ concurrency:
1717

1818
jobs:
1919
run-tests:
20+
# Skip if this is an external contribution. GitHub secrets will be empty, so the step would fail anyway.
21+
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }}
2022
runs-on: ubuntu-latest
2123
steps:
2224
- name: Print current ref and sha

0 commit comments

Comments
 (0)