Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Playwright tests #425

Merged
merged 21 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 16 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,25 @@
name: Run tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "16"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm ci
- name: Running lint and type check
run: npm run lint && npm run check-types
- name: Run web-ext lint to check Firefox mobile compability
uses: kewisch/action-web-ext@2c96cb8d05464c1dd52b96229a9f33388ba1bfad
with:
cmd: lint
source: src
- name: Create build of test content script
run: npm run build
- name: Run the tests
run: npm run test
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Running lint and type check
run: npm run lint && npm run check-types
- name: Build project and create dist files
run: "./dist.sh"
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: xvfb-run npm run test-extension
27 changes: 27 additions & 0 deletions .github/workflows/sites.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Run site tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '42 23 * * 6'
jobs:
test:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Running lint and type check
run: npm run lint && npm run check-types
- name: Build
run: npm run build
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run test-sites
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ test_build/
dist/
_site/
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
9 changes: 0 additions & 9 deletions jest-puppeteer.config.js

This file was deleted.

203 changes: 0 additions & 203 deletions jest.config.js

This file was deleted.

Loading
Loading