-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#8953 Add GitHub Workflow for running e2e tests on pre-release browse…
…rs (#8982) * add pre-release channels to playwright config * convert channel map to flat map * add projects as default imput to e2e-tests-workflow * fix edge -> msedge * validate chromium channels from E2E_CHROMIUM_CHANNELS * add E2E_CHROMIUM_CHANNELS to end-to-end-tests.yml * catch json parsing errors * remove json parsing from end-to-end-tests.yml env variables * fix json defined in single quotes * introduce e2e-test-unstable-browsers workflow * add push and workfow-dispatch to yml * make browser installation dynamic * remove magic strings in playwright.config.ts * replace msedge conditionals with msedge & msedge beta * replace msedge conditionals with msedge & msedge beta in sidebarAuth * fix strict null error in getChromiumChannelsFromEnv * replace remaining msedge magic string instances * replace remaining magic strings for chrome * rename workflow file * fix lint error * remove on push from workflow * temporarily reenable push * change workflow name again * remove push again * add .push back in to test workflow * refactor extract DEFAULT_CHANNELS * add env variable documentation for E2E_CHROMIUM_CHANNELS * remove .push and add chrome and msedge * fix type error * fix supportedChannels type * fix lint error --------- Co-authored-by: Eduardo Fungairino <[email protected]>
- Loading branch information
1 parent
4fc082c
commit 6794367
Showing
14 changed files
with
216 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,8 @@ E2E_TEST_USER_EMAIL_UNAFFILIATED=extension-e2e-test.unaffiliated@pixiebrix.test | |
E2E_TEST_USER_PASSWORD_UNAFFILIATED= | ||
E2E_TEST_USER_EMAIL_AFFILIATED=[email protected] | ||
E2E_TEST_USER_PASSWORD_AFFILIATED= | ||
# Optional configuration for running tests against specific browser versions | ||
# E2E_CHROMIUM_CHANNELS=["chrome-beta", "msedge-beta"] | ||
|
||
E2E_GOOGLE_TEST_USER_EMAIL=[email protected] | ||
# check https://start.1password.com/open/i?a=INRFJCYAHREKFCNIGK4M7FYRHM&h=pixiebrix.1password.com&i=xvn24iq54s4az7fpkskcjf7fte&v=os4xtpugongs7htmnsbvoeaujm for the password and otp key | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Pre-release Browsers | ||
|
||
on: | ||
schedule: | ||
# Run nightly at 1:00 AM EST (5:00 UTC) | ||
- cron: "0 5 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
end-to-end-tests: | ||
name: end-to-end-tests | ||
uses: ./.github/workflows/end-to-end-tests.yml | ||
secrets: inherit | ||
with: | ||
# Include stable browsers for comparison | ||
projects: '["chrome-beta", "msedge-beta", "chromium", "chrome", "msedge"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,14 +7,19 @@ on: | |
description: "Branch, tag, or commit on which to run the tests" | ||
required: false | ||
type: string | ||
projects: | ||
description: "Json parsable array of strings of projects to test. GitHub workflows does not support array inputs natively." | ||
required: false | ||
default: '["chrome", "msedge"]' | ||
type: string | ||
|
||
jobs: | ||
run-tests: | ||
name: run-tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
project: [chrome, edge] | ||
project: ${{ fromJson(inputs.projects) }} | ||
shardIndex: [1, 2, 3] | ||
shardTotal: [3] | ||
timeout-minutes: 60 | ||
|
@@ -36,6 +41,7 @@ jobs: | |
E2E_GOOGLE_TEST_USER_PASSWORD: ${{ secrets.E2E_GOOGLE_TEST_USER_PASSWORD }} | ||
E2E_GOOGLE_TEST_USER_OTP_KEY: ${{ secrets.E2E_GOOGLE_TEST_USER_OTP_KEY }} | ||
DEV_EVENT_TELEMETRY: true | ||
E2E_CHROMIUM_CHANNELS: ${{ inputs.projects }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -49,7 +55,7 @@ jobs: | |
- name: Install playwright browsers | ||
uses: Wandalen/[email protected] | ||
with: | ||
command: npx playwright install chrome msedge | ||
command: npx playwright install ${{ join(fromJson(inputs.projects), ' ') }} | ||
with: | | ||
fail_ci_if_error: true | ||
verbose: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.