Skip to content

Commit

Permalink
CI: separate browser test
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Jul 21, 2023
1 parent ec6f6fd commit eba15fc
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 4 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,66 @@ jobs:
run: yarn run build
- name: Test
run: yarn test

test-chrome:
name: "Test Chromium browser"
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: 18
os: [ubuntu-latest]
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn install
- name: Build
run: yarn run build
- name: Test
run: yarn run test:chrome

test-firefox:
name: "Test Firefox browser"
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: 18
os: [ubuntu-latest]
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn install
- name: Build
run: yarn run build
- name: Test
run: yarn run test:firefox

test-webkit:
name: "Test WebKit browser on macOS"
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: 18
os: [macos-latest]
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn install
- name: Build
run: yarn run build
- name: Test
run: yarn run test:webkit
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"build": "lerna run build",
"clean": "lerna run clean",
"test": "lerna run test && npm run size",
"test:chrome": "lerna run test:chrome",
"test:firefox": "lerna run test:firefox",
"test:webkit": "lerna run test:webkit",
"size": "size-limit",
"ci": "lerna run test --ignore '@kvs/localstorage'",
"versionup": "lerna version",
Expand Down
3 changes: 2 additions & 1 deletion packages/indexeddb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"clean": "rimraf lib/ module/",
"prettier": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"",
"prepublishOnly": "npm run clean && npm run build",
"test": "npm run test:chrome && npm run test:firefox && npm run test:webkit",
"test": "tsc -p .",
"test:browser": "npm run test:chrome && npm run test:firefox && npm run test:webkit",
"test:chrome": "playwright-test ./test/index.test.ts --runner=mocha --browser=chromium",
"test:firefox": "playwright-test ./test/index.test.ts --runner=mocha --browser=firefox",
"test:webkit": "playwright-test ./test/index.test.ts --runner=mocha --browser=webkit"
Expand Down
3 changes: 2 additions & 1 deletion packages/localstorage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"clean": "rimraf lib/ module/",
"prettier": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"",
"prepublishOnly": "npm run clean && npm run build",
"test": "npm run test:chrome && npm run test:firefox && npm run test:webkit",
"test": "tsc -p .",
"test:browser": "npm run test:chrome && npm run test:firefox && npm run test:webkit",
"test:chrome": "playwright-test ./test/index.test.ts --runner=mocha --browser=chromium",
"test:firefox": "playwright-test ./test/index.test.ts --runner=mocha --browser=firefox",
"test:webkit": "playwright-test ./test/index.test.ts --runner=mocha --browser=webkit",
Expand Down
3 changes: 2 additions & 1 deletion packages/storage-sync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"clean": "rimraf lib/ module/",
"prettier": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"",
"prepublishOnly": "npm run clean && npm run build",
"test": "npm run test:chrome && npm run test:firefox && npm run test:webkit",
"test": "tsc -p .",
"test:browser": "npm run test:chrome && npm run test:firefox && npm run test:webkit",
"test:chrome": "playwright-test ./test/index.test.ts --runner=mocha --browser=chromium",
"test:firefox": "playwright-test ./test/index.test.ts --runner=mocha --browser=firefox",
"test:webkit": "playwright-test ./test/index.test.ts --runner=mocha --browser=webkit",
Expand Down
3 changes: 2 additions & 1 deletion packages/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"clean": "rimraf lib/ module/",
"prettier": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"",
"prepublishOnly": "npm run clean && npm run build",
"test": "npm run test:chrome && npm run test:firefox && npm run test:webkit",
"test": "tsc -p .",
"test:browser": "npm run test:chrome && npm run test:firefox && npm run test:webkit",
"test:chrome": "playwright-test ./test/index.test.ts --runner=mocha --browser=chromium",
"test:firefox": "playwright-test ./test/index.test.ts --runner=mocha --browser=firefox",
"test:webkit": "playwright-test ./test/index.test.ts --runner=mocha --browser=webkit",
Expand Down

0 comments on commit eba15fc

Please sign in to comment.