Skip to content

Commit

Permalink
run browsers in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
koddsson committed Oct 23, 2023
1 parent 76fcd79 commit c3f901a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/browsers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies, build the source
# code and run tests across different versions of browsers

name: Browsers CI

on:
push:
branches: [ main, 4.x.x, 5.x.x ]
pull_request:
branches: [ main, 4.x.x, 5.x.x ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
browser-name:
- chrome
- firefox
- webkit

steps:
- uses: actions/checkout@v4
- name: ${{ matrix.browser-name }}
uses: actions/setup-node@v3
- run: npm ci
- run: npm run build --if-present
- run: npm test-chrome -- --browsers ${{ matrix.browser-name }}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"pretest": "npm run build",
"test": "npm run test-node && npm run test-chrome",
"test-node": "mocha --require ./test/bootstrap/index.js --reporter dot test/*.js",
"test-chrome": "web-test-runner",
"test-firefox": "web-test-runner --browsers firefox --playwright",
"test-chrome": "web-test-runner --playwright",
"test-cov": "istanbul cover ./node_modules/.bin/_mocha -- --require ./test/bootstrap/index.js test/*.js",
"clean": "rm -f chai.js coverage"
},
Expand Down
1 change: 0 additions & 1 deletion web-test-runner.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const commonjs = fromRollup(rollupCommonjs);

export default {
nodeResolve: true,
playwright: true,
files: ["test/*.js"],
plugins: [
commonjs({
Expand Down

0 comments on commit c3f901a

Please sign in to comment.