From a512a615bc5442543db08bf2b84e172badf29f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E?= Date: Fri, 22 Oct 2021 19:51:53 +0800 Subject: [PATCH] Use chromium, firefox and webkit in tests --- .github/workflows/test.yml | 8 ++++++-- package.json | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2b3156..1b7d587 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,8 +19,12 @@ on: - '.github/workflows/test.yml' jobs: - npm: + test: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + browser: [ chromium, firefox, webkit ] steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -28,4 +32,4 @@ jobs: cache: 'npm' node-version: 14 - run: npm ci - - run: npm test + - run: npm run test-${{ matrix.browser }} diff --git a/package.json b/package.json index dd14198..e4f9fc6 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,9 @@ "lint": "eslint .", "build": "rollup --config rollup.config.ts --configPlugin babel={extensions:[\\\".ts\\\"],babelHelpers:\\\"bundled\\\"}", "test": "playwright-test \"test/**/*.test.*\" --sw test/sw.ts", + "test-chromium": "npm test -- --browser chromium", + "test-firefox": "npm test -- --browser firefox", + "test-webkit": "npm test -- --browser webkit", "coverage": "npm test -- --cov && nyc report", "prepare": "npm run build" }