From 330e6ed3573df3010ed60603524a20ba783a212d Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 27 Aug 2021 16:07:07 +0200 Subject: [PATCH] Remove the `npm test`-command This command was added all the way back when basic CI-support was first introduced (using Travis at the time), however it's never really intended to be used e.g. for local development. By having a `npm test`-command listed in the `package.json` file, there's a very real risk that someone unfamiliar with the code-base would only run that one and thus miss all the other (more important) test-suites[1]. Hence this patch which removes the `npm test`-command, and instead simply calls the relevant gulp-task[2] directly in the GitHub Actions configuration. --- [1] Which consist of the unit-tests (run in browsers), the font-tests (potentially), the reference-tests, and the integration-tests. [2] Which is also renamed slightly, to better fit its current usage. --- .github/workflows/ci.yml | 2 +- gulpfile.js | 2 +- package.json | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc29fdf01f4c6..77cfe87902784 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,4 +21,4 @@ jobs: run: npm install - name: Run tests - run: npm test + run: gulp ci-test diff --git a/gulpfile.js b/gulpfile.js index 61d7b1acc0e49..186e99884d9aa 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2348,7 +2348,7 @@ gulp.task("externaltest", function (done) { }); gulp.task( - "npm-test", + "ci-test", gulp.series( gulp.parallel("lint", "externaltest", "unittestcli"), "lint-chromium", diff --git a/package.json b/package.json index b44f4c30df3d5..49598b3a4535d 100644 --- a/package.json +++ b/package.json @@ -64,8 +64,7 @@ "yargs": "^17.1.1" }, "scripts": { - "postinstall": "cross-env PUPPETEER_PRODUCT=firefox node node_modules/puppeteer/install.js", - "test": "gulp npm-test" + "postinstall": "cross-env PUPPETEER_PRODUCT=firefox node node_modules/puppeteer/install.js" }, "repository": { "type": "git",