From a88102de69e3d20ea90f6a09e6391a6e2eeda3b7 Mon Sep 17 00:00:00 2001 From: Rene Haas Date: Fri, 19 Aug 2022 17:39:08 +0200 Subject: [PATCH] configure codecov --- .github/codecov.yml | 16 ++++++++++++++ .github/workflows/test.yml | 16 +++++++------- codecov.yml | 2 -- local/config/src/playwright.js | 2 +- local/playwright-tooling/src/expectSuccess.js | 4 ++-- .../structureSetup/update/index.test.ts | 21 ++++++++++++------- 6 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 .github/codecov.yml delete mode 100644 codecov.yml diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 0000000..bb39e3e --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,16 @@ +codecov: require_ci_to_pass: no; +notify: wait_for_ci: no; + +coverage: + status: + project: off + patch: off + + +flag_management: + default_rules: + carryforward: true + individual_flags: + - name: overlayscrollbars + paths: + - packages/overlayscrollbars diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c04f35b..e1ea291 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,13 +23,15 @@ jobs: run: npm ci --install-links - name: Run Jest run: npm run jest - - uses: codecov/codecov-action@v3 - with: - flags: unit - files: "**/jest/coverage*.json" - name: Run Playwright run: xvfb-run npm run playwright - - uses: codecov/codecov-action@v3 + - name: Upload coverage reports + uses: codecov/codecov-action@v3 with: - flags: ui - files: "**/playwright/coverage*.json" \ No newline at end of file + flags: overlayscrollbars,unit + files: "overlayscrollbars/**/jest/coverage*.json" + - name: Upload coverage reports + uses: codecov/codecov-action@v3 + with: + flags: overlayscrollbars,ui + files: "overlayscrollbars/**/playwright/coverage*.json" diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 31605b1..0000000 --- a/codecov.yml +++ /dev/null @@ -1,2 +0,0 @@ -codecov: require_ci_to_pass: no; -notify: wait_for_ci: no; diff --git a/local/config/src/playwright.js b/local/config/src/playwright.js index 542ed3f..2bba286 100644 --- a/local/config/src/playwright.js +++ b/local/config/src/playwright.js @@ -2,7 +2,7 @@ const { devices } = require('@playwright/test'); module.exports = { testMatch: /.*\/tests\/playwright\/.*\.test\.[jt]sx?/, - timeout: 10 * 60 * 2000, + timeout: 10 * 60 * 1500, navigationTimeout: 1000, retries: 0, maxFailures: 0, diff --git a/local/playwright-tooling/src/expectSuccess.js b/local/playwright-tooling/src/expectSuccess.js index f70fb4a..82d8857 100644 --- a/local/playwright-tooling/src/expectSuccess.js +++ b/local/playwright-tooling/src/expectSuccess.js @@ -8,8 +8,8 @@ const logError = async (page, ...args) => { console.log(title, ...args); }; -// default timeout = // 10mins -module.exports = async (page, timeout = 10 * 60 * 2000) => { +// default timeout = // 15mins +module.exports = async (page, timeout = 10 * 60 * 1500) => { page.on('pageerror', (err) => { logError(page, err.message); }); diff --git a/packages/overlayscrollbars/tests/playwright/setups/structureSetup/update/index.test.ts b/packages/overlayscrollbars/tests/playwright/setups/structureSetup/update/index.test.ts index e102e5e..fd0eeae 100644 --- a/packages/overlayscrollbars/tests/playwright/setups/structureSetup/update/index.test.ts +++ b/packages/overlayscrollbars/tests/playwright/setups/structureSetup/update/index.test.ts @@ -28,11 +28,12 @@ const createTests = (fast?: boolean) => { } }; + // Viewport is target should only be initialized when nativeScrollbarHiding is supported thus tests with this combo doesnt make sense + if (!nativeScrollbarHiding && viewportIsTarget) { + return; + } + test.beforeEach(async ({ page }) => { - test.skip( - !nativeScrollbarHiding && viewportIsTarget, - 'Viewport is target should only be initialized when nativeScrollbarHiding is supported.' - ); await setFast(page); await setTargetIsVp(page); await nsh(page); @@ -72,10 +73,14 @@ const createTests = (fast?: boolean) => { }); }; -test.describe('StructureSetup.update @special', () => { - createTests(); -}); +test.describe.configure({ mode: 'parallel' }); test.describe('StructureSetup.update', () => { - createTests(true); + test.describe('default', () => { + createTests(true); + }); + + test.describe('@special', () => { + createTests(); + }); });