Skip to content

Commit

Permalink
test: only webkit on ci. (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
morganney authored Jan 17, 2024
1 parent 36b24d2 commit 3afba98
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 22 deletions.
1 change: 0 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
- name: Install Certificates
run: |
mkcert -install
mkcert -install
mkcert -key-file busmap.localhost-key.pem -cert-file busmap.localhost.pem busmap.localhost localhost
cp *.pem packages/web/certs
Expand Down
61 changes: 40 additions & 21 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,54 @@ export default defineConfig({
},

/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] }
},
projects: process.env.CI
? [
/**
* Ubuntu and mkcert issues with Chrome / Firefox
* @see https://github.com/FiloSottile/mkcert/issues/447
*
* Other option is to use macos GitHub action runner and
* install docker, etc. Could also, use `ignoreHTTPSErrors`
* from playwright in the test specs to cover more browsers.
*/
{
name: 'webkit',
use: { ...devices['Desktop Safari'] }
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] }
},
/* Test against mobile viewports. */
{
name: 'Mobile Safari',
use: { ...devices['iPhone 12'] }
}
]
: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] }
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] }
},

/* Test against mobile viewports. */
{
name: 'Mobile Chrome',
use: { ...devices['Pixel 5'] }
},
{
name: 'Mobile Safari',
use: { ...devices['iPhone 12'] }
}
],
/* Test against mobile viewports. */
{
name: 'Mobile Chrome',
use: { ...devices['Pixel 5'] }
},
{
name: 'Mobile Safari',
use: { ...devices['iPhone 12'] }
}
],

/* Run your local dev server before starting the tests */
webServer: {
command: 'docker compose -f compose.yaml up --attach-dependencies stage',
ignoreHTTPSErrors: true,
url: 'https://localhost/healthcheck',
reuseExistingServer: !process.env.CI,
timeout: 60_000 * 7,
stdout: 'pipe'
timeout: 60_000 * 7
}
})

0 comments on commit 3afba98

Please sign in to comment.