From 9964a6619ca9eb72996cc1abb0cc8be4b11c65a7 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Mon, 18 Oct 2021 15:58:56 -0400 Subject: [PATCH] separate 'npm test' from 'npm lint' (#22191) * separate 'npm test' from 'npm lint' * remove delberately eslint violation (but keep prettier violation) * undo prettier violation * tighten up us of our scripts for testing and lint --- .github/workflows/js-lint.yml | 2 +- .github/workflows/test-windows.yml | 4 +--- .github/workflows/test.yml | 4 +--- package.json | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/js-lint.yml b/.github/workflows/js-lint.yml index c0d2169959..da7881c647 100644 --- a/.github/workflows/js-lint.yml +++ b/.github/workflows/js-lint.yml @@ -28,4 +28,4 @@ jobs: run: npm ci - name: Run linter - run: npx eslint . + run: npm run lint diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index e86e0ed038..20d7e2d2cd 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -52,6 +52,4 @@ jobs: run: npm run build - name: Run tests - run: npx jest tests/${{ matrix.test-group }}/ - env: - NODE_OPTIONS: '--max_old_space_size=8192' + run: npm run test tests/${{ matrix.test-group }}/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f437fc6a63..3d2ac16e25 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,6 +57,4 @@ jobs: run: npm run build - name: Run tests - run: npx jest tests/${{ matrix.test-group }}/ - env: - NODE_OPTIONS: '--max_old_space_size=8192 --experimental-vm-modules' + run: npm run test tests/${{ matrix.test-group }}/ diff --git a/package.json b/package.json index e391dcc8f2..9c6c962e89 100644 --- a/package.json +++ b/package.json @@ -221,7 +221,7 @@ "sync-search-ghes-release": "cross-env GHES_RELEASE=1 start-server-and-test sync-search-server 4002 sync-search-indices", "sync-search-indices": "script/sync-search-indices.js", "sync-search-server": "cross-env NODE_ENV=production WEB_CONCURRENCY=1 PORT=4002 node server.mjs", - "test": "npm run lint && cross-env NODE_OPTIONS=--experimental-vm-modules jest", + "test": "cross-env NODE_OPTIONS='--max_old_space_size=8192 --experimental-vm-modules' jest", "test-watch": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch --notify --notifyMode=change --coverage" }, "lint-staged": {