configure codecov

This commit is contained in:
Rene Haas
2022-08-19 17:39:08 +02:00
parent a6b40e0231
commit a88102de69
6 changed files with 41 additions and 20 deletions
+16
View File
@@ -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
+9 -7
View File
@@ -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"
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"
-2
View File
@@ -1,2 +0,0 @@
codecov: require_ci_to_pass: no;
notify: wait_for_ci: no;
+1 -1
View File
@@ -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,
@@ -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);
});
@@ -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();
});
});