Skip to content
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

Merged
merged 1 commit into from Oct 27, 2022

Conversation

lforst
Copy link
Member

@lforst lforst commented Oct 27, 2022

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.

@lforst lforst marked this pull request as ready for review October 27, 2022 11:49
@@ -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
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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

Copy link
Member

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 :shipit:

@lforst lforst merged commit 1e98d2e into getsentry:master Oct 27, 2022
@lforst lforst deleted the lforst-dont-run-e2e-on-forks branch October 27, 2022 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants