Skip to content

Commit

Permalink
Switch to Playwright for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanw committed Jan 27, 2024
1 parent 3505f3e commit a8cb534
Show file tree
Hide file tree
Showing 15 changed files with 4,832 additions and 14,093 deletions.
57 changes: 26 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,35 @@
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: Run web-ext lint to check Firefox mobile compability
uses: kewisch/action-web-ext@2c96cb8d05464c1dd52b96229a9f33388ba1bfad # hash pinned to v1.2
with:
cmd: lint
source: src
channel: listed
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
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

0 comments on commit a8cb534

Please sign in to comment.