Skip to content

Commit

Permalink
[ci, scripts] Remove duplicate unused unit tests in CI (#3866)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sotojn authored Dec 10, 2024
1 parent 633e2ab commit c0a6aeb
Show file tree
Hide file tree
Showing 19 changed files with 16 additions and 49 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
"search": [],
"restrained": [],
"unit": [],
"unit-esm": [],
"_for_testing_": [
"elasticsearch"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/data-mate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
"srcMain": "src/index.ts",
"terascope": {
"enableTypedoc": true,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/data-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
"srcMain": "src/index.ts",
"terascope": {
"enableTypedoc": true,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
},
"terascope": {
"enableTypedoc": false,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/job-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@
"srcMain": "src/index.ts",
"terascope": {
"enableTypedoc": true,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@
"srcMain": "src/index.ts",
"terascope": {
"enableTypedoc": false,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
6 changes: 0 additions & 6 deletions packages/scripts/test/test-runner-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/terafoundation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
},
"terascope": {
"enableTypedoc": true,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/teraslice-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
},
"srcMain": "src/index.ts",
"terascope": {
"testSuite": "unit-esm",
"testSuite": "unit",
"enableTypedoc": true
}
}
2 changes: 1 addition & 1 deletion packages/teraslice-client-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
"srcMain": "src/index.ts",
"terascope": {
"enableTypedoc": true,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/teraslice-messaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@
"srcMain": "src/index.ts",
"terascope": {
"enableTypedoc": true,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/teraslice-state-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
"srcMain": "src/index.ts",
"terascope": {
"enableTypedoc": true,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/teraslice-test-harness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"srcMain": "src/index.ts",
"terascope": {
"enableTypedoc": true,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/ts-transforms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
"srcMain": "src/index.ts",
"terascope": {
"enableTypedoc": true,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@
"srcMain": "src/index.ts",
"terascope": {
"enableTypedoc": true,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/xlucene-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@
"srcMain": "src/index.ts",
"terascope": {
"enableTypedoc": true,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/xlucene-translator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
"srcMain": "src/index.ts",
"terascope": {
"enableTypedoc": true,
"testSuite": "unit-esm"
"testSuite": "unit"
}
}
2 changes: 1 addition & 1 deletion packages/xpressions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"srcMain": "src/index.ts",
"terascope": {
"testSuite": "unit-esm",
"testSuite": "unit",
"enableTypedoc": true
}
}

0 comments on commit c0a6aeb

Please sign in to comment.