Skip to content

Commit

Permalink
build(test): remove unnecessary coverage artifacts (#3066)
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzhao committed Nov 13, 2022
1 parent 91d43b6 commit 75462be
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 332 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Build
run: bolt build
- name: Run tests
run: bolt coverage:fast
run: bolt test:fast

slow-tests:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -110,6 +110,6 @@ jobs:
- name: Build
run: bolt build
- name: Test
run: bolt coverage:slow
run: bolt test
env:
DEBUG: electron-installer-snap:snapcraft
11 changes: 0 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
"build:fast": "bolt ws exec -- swc src --out-dir dist --quiet --extensions \".ts\" --config-file ../../../.swcrc",
"build:full": "bolt ws exec -- tsc -b",
"postbuild": "ts-node tools/test-dist",
"coverage:fast": "xvfb-maybe cross-env INTEGRATION_TESTS=0 TS_NODE_PROJECT='./tsconfig.test.json' TS_NODE_FILES=1 nyc mocha './tools/test-globber.ts' && nyc report --reporter=text-lcov > coverage.lcov",
"coverage:slow": "xvfb-maybe cross-env TS_NODE_PROJECT='./tsconfig.test.json' TS_NODE_FILES=1 nyc mocha './tools/test-globber.ts' --integration && nyc report --reporter=text-lcov > coverage.lcov",
"docs": "bolt build:full && bolt docs:generate",
"docs:generate": "bolt docs:plugin && node --max-old-space-size=8192 -r ts-node/register ./tools/gen-docs.ts",
"docs:plugin": "cd ./tools/doc-plugin && yarn build",
Expand Down Expand Up @@ -91,7 +89,6 @@
"yarn-or-npm": "^3.0.1"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@knodes/typedoc-plugin-monorepo-readmes": "0.22.5",
"@malept/eslint-config": "^2.0.0",
"@swc/cli": "^0.1.49",
Expand Down Expand Up @@ -141,7 +138,6 @@
"listr2": "^5.0.3",
"minimist": "^1.2.6",
"mocha": "^9.0.1",
"nyc": "^15.1.0",
"prettier": "^2.4.0",
"proxyquire": "^2.1.3",
"rimraf": "^3.0.1",
Expand Down Expand Up @@ -171,13 +167,6 @@
"eslint --fix"
]
},
"nyc": {
"exclude": [
"packages/*/*/test/**/*.{js,ts}",
"tools/*.ts"
],
"extends": "@istanbuljs/nyc-config-typescript"
},
"prettier": {
"singleQuote": true
},
Expand Down
10 changes: 1 addition & 9 deletions tools/test-globber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,13 @@ for (const p of packages) {

// normalize for Windows
const packagePath = p.path.replace(/\\/g, '/');

const apiSpec = path.posix.join(packagePath, 'test', 'slow', 'api_spec_slow.ts');
const specGlob: string[] = [];

if (argv.integration) {
specGlob.push(apiSpec);
} else if (argv.glob) {
if (argv.glob) {
specGlob.push(path.posix.join(packagePath, argv.glob));
} else {
specGlob.push(path.posix.join(packagePath, 'test', '**', `*_spec${isFast ? '' : '*'}.ts`));
}

if (argv.integration === false || process.env.INTEGRATION_TESTS === '0') {
specGlob.push(`!${apiSpec}`);
}
testFiles.push(...glob.sync(specGlob));
}

Expand Down
Loading

0 comments on commit 75462be

Please sign in to comment.