Skip to content

Commit

Permalink
test: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed Dec 11, 2024
1 parent a297233 commit 063b326
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
strategy:
matrix:
include:
- os: ubuntu-latest
browser: firefox
- os: ubuntu-latest
browser: chromium
- os: macos-latest
browser: webkit
- os: windows-latest
browser: msedge
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Install Playwright Browsers
working-directory: .tests
run: pnpm playwright install --with-deps ${{ matrix.browser }}
- name: Run Playwright tests
working-directory: .tests
run: pnpm test -- --project=${{ matrix.browser }}
19 changes: 18 additions & 1 deletion .tests/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,24 @@ export default defineConfig({
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
use: devices["Desktop Chrome"],
},
{
name: "webkit",
use: devices["Desktop Safari"],
},
{
name: "msedge",
use: {
...devices["Desktop Edge"],
// Desktop Edge uses chromium by default
// https://github.com/microsoft/playwright/blob/993546c1bc3267fb72eddaf8cf003cb2e1519598/packages/playwright-core/src/server/deviceDescriptorsSource.json#L1652
channel: "msedge",
},
},
{
name: "firefox",
use: devices["Desktop Firefox"],
},
],
});

0 comments on commit 063b326

Please sign in to comment.