Skip to content

Commit

Permalink
Install playwright dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemanrubia committed Oct 15, 2024
1 parent b9f1957 commit 1e4151b
Show file tree
Hide file tree
Showing 4 changed files with 273 additions and 50 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,38 @@ on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn run playwright install --with-deps
- run: yarn build

- name: Set Chrome Version
run: |
CHROMEVER="$(chromedriver --version | cut -d' ' -f2)"
echo "Actions ChromeDriver is $CHROMEVER"
echo "CHROMEVER=${CHROMEVER}" >> $GITHUB_ENV
- name: Lint
run: yarn lint

- name: Unit Test
run: yarn test:unit

- name: Chrome Test
run: yarn test:browser --project=chrome

- name: Firefox Test
run: yarn test:browser --project=firefox

- uses: actions/upload-artifact@v3
with:
name: turbo-dist
path: dist/*
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'
- name: Install Playwright dependencies
run: yarn install --frozen-lockfile
- run: npx playwright install-deps
- run: yarn build

- name: Set Chrome Version
run: |
CHROMEVER="$(chromedriver --version | cut -d' ' -f2)"
echo "Actions ChromeDriver is $CHROMEVER"
echo "CHROMEVER=${CHROMEVER}" >> $GITHUB_ENV
- name: Lint
run: yarn lint

- name: Unit Test
run: yarn test:unit

- name: Chrome Test
run: yarn test:browser --project=chrome

- name: Firefox Test
run: yarn test:browser --project=firefox

- uses: actions/upload-artifact@v3
with:
name: turbo-dist
path: dist/*
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
},
"devDependencies": {
"@open-wc/testing": "^3.1.7",
"@playwright/test": "~1.48.0",
"@playwright/test": "^1.48.0",
"@rollup/plugin-node-resolve": "13.1.3",
"@web/dev-server-esbuild": "^0.3.3",
"@web/test-runner": "^0.15.0",
"@web/test-runner-playwright": "^0.9.0",
"@web/test-runner-playwright": "^0.11.0",
"arg": "^5.0.1",
"body-parser": "^1.20.1",
"chai": "~4.3.4",
Expand Down
6 changes: 2 additions & 4 deletions playwright.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { devices } from "@playwright/test"

const config = {
projects: [
{
name: "chrome",
use: {
...devices["Desktop Chrome"],
channel: 'chrome',
contextOptions: {
timeout: 60000
},
Expand All @@ -15,7 +13,7 @@ const config = {
{
name: "firefox",
use: {
...devices["Desktop Firefox"],
use: { browserName: 'firefox' },
contextOptions: {
timeout: 60000
},
Expand Down
Loading

0 comments on commit 1e4151b

Please sign in to comment.