Skip to content

Commit

Permalink
ci: narrowing playwright CI tests to chromium
Browse files Browse the repository at this point in the history
  • Loading branch information
deltork committed Nov 20, 2024
1 parent 6275aef commit 4d8b06a
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 37 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/end-to-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,6 @@ jobs:
run: |
npx nx build web-component
npx nx test:once studio-web
- name: Run studio-web in the background
run: |
npx nx build web-component
npx nx run-many --targets=serve,serve-fr,serve-es --projects=web-component,studio-web --parallel 6 &
# wait for the studio web to be up
sleep 120
curl --retry 20 --retry-delay 30 --retry-all-errors http://localhost:4200
- name: Playwright for studio-web
run: |
npx playwright install --with-deps firefox chromium webkit
npx nx e2e studio-web
- name: Cypress run for web-component
uses: cypress-io/github-action@v6
with:
Expand Down Expand Up @@ -90,3 +77,16 @@ jobs:
npx nx bundle web-component
git status
git diff --word-diff=porcelain --word-diff-regex=... --color | perl -ple 's/^(\x1b[^ -+]{0,6})? (.{81,})$/$1 . " " . substr($2, 0, 40) . " [... " . (length($2)-80) . " bytes ...] " . substr($2, -40)/ex'
- name: Run studio-web in the background
run: |
npx nx build web-component
npx nx run-many --targets=serve,serve-fr,serve-es --projects=web-component,studio-web --parallel 6 &
# wait for the studio web to be up
sleep 100
curl --retry 20 --retry-delay 30 --retry-all-errors http://localhost:4200
- name: Playwright for studio-web
run: |
npx playwright install --with-deps chromium
npx nx e2e studio-web
60 changes: 36 additions & 24 deletions packages/studio-web/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,42 +36,54 @@ export default defineConfig({
},

/* Configure projects for major browsers */
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
/* Only test chromium on CI */
projects: process.env.CI
? [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
{
name: "Mobile Chrome",
use: { ...devices["Pixel 5"] },
},
]
: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},

{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},
/* We do not have full webkit support
{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},
/* We do not have full webkit support
{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
/* Test against mobile viewports. */
{
name: "Mobile Chrome",
use: { ...devices["Pixel 5"] },
},
/*{
{
name: "Mobile Chrome",
use: { ...devices["Pixel 5"] },
},
/*{
name: "Mobile Safari",
use: { ...devices["iPhone 12"] },
},
/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],

/* Run your local dev server before starting the tests */
// webServer: {
Expand Down

0 comments on commit 4d8b06a

Please sign in to comment.