Skip to content

Commit 89249d0

Browse files
authored
ci: fix failing dev server tests on PRs from forks (#8153)
#### Summary On fork PRs, secrets can't be resolved, so `NETLIFY_AUTH_TOKEN` becomes an empty string, because of the way this line was written: ```yaml NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} ``` This causes some integration tests to fail ([example job](https://github.com/netlify/cli/actions/runs/24239957758)) even though they don't actually need a real token. Set a fallback 'fake-token' to fix this. > [!TIP] > I sent this PR from a fork to self-validate the fix.
1 parent b19d977 commit 89249d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/integration-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ jobs:
6666
run: npm run test:integration -- --coverage --shard=${{ matrix.shard }}
6767
env:
6868
NETLIFY_TEST_ACCOUNT_SLUG: 'netlify-integration-testing'
69-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
69+
# PRs from forks don't have access to this secret, which
70+
# may be used by some tests.
71+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN || 'fake-token' }}
7072
# NETLIFY_TEST_GITHUB_TOKEN is used to avoid reaching GitHub API limits in exec-fetcher.js
7173
NETLIFY_TEST_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7274
# Changes the polling interval used by the file watcher

0 commit comments

Comments
 (0)