New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci(e2e): Don't run E2E tests on forked PRs #6063
Conversation
@@ -620,7 +620,7 @@ jobs: | |||
job_e2e_tests: | |||
name: E2E Tests | |||
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks | |||
if: github.repository == 'getsentry/sentry-javascript' | |||
if: github.event.pull_request.head.repo.full_name == github.repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to skip the e2e tests in general, wonder why the initial check doesn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What makes you think that? Tried here in a non-fork and they are executed: #6064
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
github.event.pull_request.head.repo.full_name
is equal to the repository where the HEAD is located.github.repository
is equal to the repository where CI runs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That it was skipped here https://github.com/getsentry/sentry-javascript/actions/runs/3337046260/jobs/5523555712
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is because this PR comes from a fork - to test this behaviour
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I’m a complete dummy - didn’t even take that in. Well then awesome
Previous attempts to not run E2E tests on PRs didn't work so here we go again. We do this because we cannot run the E2E tests on forks because they require secrets that GitHub doesn't provide in fork actions.
This PR was done via fork so we can actually confirm this is working.