From c0a6aebba21fe5902aa2636ba1214b894a95395b Mon Sep 17 00:00:00 2001 From: Joseph Soto Date: Tue, 10 Dec 2024 14:44:55 -0700 Subject: [PATCH] [ci, scripts] Remove duplicate unused unit tests in CI (#3866) This PR makes the following changes: - Migrates all unit tests from `unit-esm` back to `unit` - Removes `linux-unit-esm-tests` from ci - This is no longer needed because all tests have been migrated to `linux-unit-tests` Ref to issue #3858 --- .github/workflows/test.yml | 26 ------------------- package.json | 1 - packages/data-mate/package.json | 2 +- packages/data-types/package.json | 2 +- packages/eslint-config/package.json | 2 +- packages/job-components/package.json | 2 +- packages/scripts/package.json | 2 +- packages/scripts/test/test-runner-spec.ts | 6 ----- packages/terafoundation/package.json | 2 +- packages/teraslice-cli/package.json | 2 +- packages/teraslice-client-js/package.json | 2 +- packages/teraslice-messaging/package.json | 2 +- packages/teraslice-state-storage/package.json | 2 +- packages/teraslice-test-harness/package.json | 2 +- packages/ts-transforms/package.json | 2 +- packages/utils/package.json | 2 +- packages/xlucene-parser/package.json | 2 +- packages/xlucene-translator/package.json | 2 +- packages/xpressions/package.json | 2 +- 19 files changed, 16 insertions(+), 49 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2735a535534..d70f4e40b2d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,32 +78,6 @@ jobs: - name: Test run: yarn --silent test -- --suite unit -- - linux-unit-esm-tests: - runs-on: ubuntu-latest - needs: compute-node-version-vars - strategy: - matrix: - node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS) }} - steps: - - name: Check out code - uses: actions/checkout@v4 - - - name: Setup Node ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'yarn' - - - name: Install and build packages - run: yarn setup - env: - YARN_SETUP_ARGS: "--prod=false --silent" - - - name: Test - run: yarn --silent test -- --suite unit-esm -- - env: - NODE_OPTIONS: '--experimental-vm-modules' - teraslice-elasticsearch-tests: runs-on: ubuntu-latest needs: [compute-node-version-vars, verify-build, cache-docker-images] diff --git a/package.json b/package.json index 8b5dddf9ae0..dcdc16886e3 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,6 @@ "search": [], "restrained": [], "unit": [], - "unit-esm": [], "_for_testing_": [ "elasticsearch" ], diff --git a/packages/data-mate/package.json b/packages/data-mate/package.json index 06316029c40..148820b968a 100644 --- a/packages/data-mate/package.json +++ b/packages/data-mate/package.json @@ -66,6 +66,6 @@ "srcMain": "src/index.ts", "terascope": { "enableTypedoc": true, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/data-types/package.json b/packages/data-types/package.json index 6302533a352..468d0dadb20 100644 --- a/packages/data-types/package.json +++ b/packages/data-types/package.json @@ -48,6 +48,6 @@ "srcMain": "src/index.ts", "terascope": { "enableTypedoc": true, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 81554607170..64375090e9d 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -46,6 +46,6 @@ }, "terascope": { "enableTypedoc": false, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/job-components/package.json b/packages/job-components/package.json index 239bac4c9a0..51359a5a506 100644 --- a/packages/job-components/package.json +++ b/packages/job-components/package.json @@ -58,6 +58,6 @@ "srcMain": "src/index.ts", "terascope": { "enableTypedoc": true, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 55548792d0b..0027b58f61f 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -84,6 +84,6 @@ "srcMain": "src/index.ts", "terascope": { "enableTypedoc": false, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/scripts/test/test-runner-spec.ts b/packages/scripts/test/test-runner-spec.ts index a3cb8516b62..d428592aaef 100644 --- a/packages/scripts/test/test-runner-spec.ts +++ b/packages/scripts/test/test-runner-spec.ts @@ -85,14 +85,8 @@ describe('Test Runner Helpers', () => { suite: ['unit'] })); - const unitEsmTests = filterBySuite(packages, makeTestOptions({ - all: true, - suite: ['unit-esm'] - })); - const unitAndESPackages = [ ...unitTests, - ...unitEsmTests, ...restrainedTests, ...opensearchTests, ...elasticsearchTests diff --git a/packages/terafoundation/package.json b/packages/terafoundation/package.json index 45b91412a4f..9eccc866c62 100644 --- a/packages/terafoundation/package.json +++ b/packages/terafoundation/package.json @@ -62,6 +62,6 @@ }, "terascope": { "enableTypedoc": true, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/teraslice-cli/package.json b/packages/teraslice-cli/package.json index 4f748ae5005..9966a89bdfa 100644 --- a/packages/teraslice-cli/package.json +++ b/packages/teraslice-cli/package.json @@ -89,7 +89,7 @@ }, "srcMain": "src/index.ts", "terascope": { - "testSuite": "unit-esm", + "testSuite": "unit", "enableTypedoc": true } } diff --git a/packages/teraslice-client-js/package.json b/packages/teraslice-client-js/package.json index 569c8ca8b6a..017948d6e3b 100644 --- a/packages/teraslice-client-js/package.json +++ b/packages/teraslice-client-js/package.json @@ -51,6 +51,6 @@ "srcMain": "src/index.ts", "terascope": { "enableTypedoc": true, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/teraslice-messaging/package.json b/packages/teraslice-messaging/package.json index 2ce712e65d1..0535a5ab7d9 100644 --- a/packages/teraslice-messaging/package.json +++ b/packages/teraslice-messaging/package.json @@ -60,6 +60,6 @@ "srcMain": "src/index.ts", "terascope": { "enableTypedoc": true, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/teraslice-state-storage/package.json b/packages/teraslice-state-storage/package.json index e847ca88e9d..4243b48e301 100644 --- a/packages/teraslice-state-storage/package.json +++ b/packages/teraslice-state-storage/package.json @@ -38,6 +38,6 @@ "srcMain": "src/index.ts", "terascope": { "enableTypedoc": true, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/teraslice-test-harness/package.json b/packages/teraslice-test-harness/package.json index 19ed1218715..906e0d12b52 100644 --- a/packages/teraslice-test-harness/package.json +++ b/packages/teraslice-test-harness/package.json @@ -52,6 +52,6 @@ "srcMain": "src/index.ts", "terascope": { "enableTypedoc": true, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/ts-transforms/package.json b/packages/ts-transforms/package.json index 2ba91b5b1ed..0c2e763c724 100644 --- a/packages/ts-transforms/package.json +++ b/packages/ts-transforms/package.json @@ -66,6 +66,6 @@ "srcMain": "src/index.ts", "terascope": { "enableTypedoc": true, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/utils/package.json b/packages/utils/package.json index e85046a5282..79e7fcf810e 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -84,6 +84,6 @@ "srcMain": "src/index.ts", "terascope": { "enableTypedoc": true, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/xlucene-parser/package.json b/packages/xlucene-parser/package.json index 7b127d6b075..ba9fcbf4f5c 100644 --- a/packages/xlucene-parser/package.json +++ b/packages/xlucene-parser/package.json @@ -53,6 +53,6 @@ "srcMain": "src/index.ts", "terascope": { "enableTypedoc": true, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/xlucene-translator/package.json b/packages/xlucene-translator/package.json index 268fef0be04..2f1cfa03b6a 100644 --- a/packages/xlucene-translator/package.json +++ b/packages/xlucene-translator/package.json @@ -48,6 +48,6 @@ "srcMain": "src/index.ts", "terascope": { "enableTypedoc": true, - "testSuite": "unit-esm" + "testSuite": "unit" } } diff --git a/packages/xpressions/package.json b/packages/xpressions/package.json index bc26129560d..74827f1a06b 100644 --- a/packages/xpressions/package.json +++ b/packages/xpressions/package.json @@ -39,7 +39,7 @@ }, "srcMain": "src/index.ts", "terascope": { - "testSuite": "unit-esm", + "testSuite": "unit", "enableTypedoc": true } }