-
Notifications
You must be signed in to change notification settings - Fork 205
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
Run full E2E test suite on PRs #4996
Conversation
Preview URL 🚀 : https://blurts-server-pr-4996-mgjlpikfea-uk.a.run.app |
cf6f9b5
to
6a7fc3f
Compare
c096357
to
67367f7
Compare
d4e90a3
to
c2ee1db
Compare
c2ee1db
to
a540ed9
Compare
848b7dd
to
91068dc
Compare
03d949d
to
5a7f7f3
Compare
f5177a9
to
8d3813b
Compare
@@ -1,4 +1,4 @@ | |||
name: Monitor e2e Smoke Tests | |||
name: Monitor E2E Test Suite (smoke) |
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.
@flozia are we comfortable deleting this yml as a part of this PR?
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.
@mansaj I think the renaming should not cause any issues or what do you think?
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.
Renaming wouldn't cause issue, I'm more asking if we can delete the smoke PR workflow
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.
@mansaj Yes, we can delete the smoke test suite soon. I'd like to have keep it for now and leave it mandatory for merging PR’s. The full test suite will be not mandatory until we better learn about and fix some of the cery flaky tests.
LGTM overall! |
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.
Some great improvements here Florian, nice job! Looking forward to seeing how they run on PRs in the coming weeks.
My main suggestions are around removing the need for manually setting so many env vars for the common case. In my ideal world, if you have a working local setup (i.e. the vars under ## Secrets
in .env.local.example
are set), running npm run e2e:full
should be enough for a successful run, but I don't know if there's a reason that that's not feasible.
.github/workflows/e2e_pr_full.yml
Outdated
- name: Run Playwright tests | ||
if: github.actor != 'dependabot[bot]' | ||
run: npm run e2e -- --update-snapshots | ||
timeout-minutes: 40 |
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.
They're running a lot faster than this now, right? If so, we might want to catch stalling tests (or execution speed regressions) earlier?
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’s right. I halved the value 20
minutes for now. If we still see the tests performing consistently way below that, we can decrease to 10
.
|
||
- name: Run Playwright tests | ||
if: github.actor != 'dependabot[bot]' | ||
run: npm run e2e -- --update-snapshots |
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.
Doesn't this make visual regression tests always succeed, and hence not catch any issues?
run: npm run e2e -- --update-snapshots | |
run: npm run e2e |
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 right! This is the same configuration we are using from the cronjob running the full E2E test suite. Happy to update this later, but for now I’d like to focus on catching functional test failure.
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.
Works for me, I created https://mozilla-hub.atlassian.net/browse/MNTOR-3655 to follow up.
timeout-minutes: 40 | ||
env: | ||
E2E_TEST_ENV: local | ||
E2E_TEST_BASE_URL: http://localhost:6060 |
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.
Potential for a small improvement: if this env var is unset, auto-detect it based on E2E_TEST_ENV
?
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.
ONEREP_API_KEY: ${{ secrets.ONEREP_API_KEY }} | ||
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | ||
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }} | ||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/blurts |
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 doesn't need to be set either, right? Since it's already set in .env
?
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.
See comment above: #4996 (comment).
E2E_TEST_ACCOUNT_EMAIL: ${{ secrets.E2E_TEST_ACCOUNT_EMAIL }} | ||
E2E_TEST_ACCOUNT_EMAIL_ZERO_BREACHES: ${{ secrets.E2E_TEST_ACCOUNT_EMAIL_ZERO_BREACHES }} | ||
E2E_TEST_ACCOUNT_EMAIL_EXPOSURES_STARTED: ${{ secrets.E2E_TEST_ACCOUNT_EMAIL_EXPOSURES_STARTED }} | ||
E2E_TEST_ACCOUNT_PASSWORD: ${{ secrets.E2E_TEST_ACCOUNT_PASSWORD }} | ||
E2E_TEST_PAYPAL_LOGIN: ${{ secrets.E2E_TEST_PAYPAL_LOGIN }} | ||
E2E_TEST_PAYPAL_PASSWORD: ${{ secrets.E2E_TEST_PAYPAL_PASSWORD }} |
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.
Can we just add these to .env
? I don't think they're sensitive right - worst case, someone can abuse them to make our e2e tests fail.
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.
Not sensitive but I think we'd want to keep them private. Someone can reset the password for these emails and it'd be annoying for us.
26854a3
to
52d8b8f
Compare
Cleanup completed - database 'blurts-server-pr-4996' destroyed, cloud run service 'blurts-server-pr-4996' destroyed |
References:
Jira: MNTOR-3598
Description
This PR adds a GitHub workflow to run the full E2E test suite on PRs against the
main
branch. Ideally, we’ll mark this new workflow as optional for now so we can monitor and address its success rate before blocking PRs on it. Adding the ability to track metrics regarding the E2E test runs will be part of a follow-up effort.The main changes for the E2E tests introduced by this PR are:
stage
environment.env
variables set.