Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@
"ci:test:jest:coverage": "c8 --no-clean npm run test:jest:report",
"ci:test:mocha": "npm run test:mocha",
"ci:test:mocha:coverage": "cross-env FLUID_TEST_TIMEOUT=4s c8 --no-clean npm run test:mocha",
"ci:test:mocha:dds:merge-tree:farm": "npm run test:mocha:dds:merge-tree:farm",
"ci:test:mocha:dds:merge-tree:farm:coverage": "cross-env FLUID_TEST_TIMEOUT=4s c8 --no-clean npm run test:mocha:dds:merge-tree:farm",
"ci:test:mocha:dds:merge-tree:unit": "npm run test:mocha:dds:merge-tree:unit",
"ci:test:mocha:dds:merge-tree:unit:coverage": "cross-env FLUID_TEST_TIMEOUT=4s c8 --no-clean npm run test:mocha:dds:merge-tree:unit",
"ci:test:mocha:dds:other": "npm run test:mocha:dds:other",
"ci:test:mocha:dds:other:coverage": "cross-env FLUID_TEST_TIMEOUT=4s c8 --no-clean npm run test:mocha:dds:other",
"ci:test:mocha:dds:tree": "npm run test:mocha:dds:tree",
"ci:test:mocha:dds:tree:coverage": "cross-env FLUID_TEST_TIMEOUT=4s c8 --no-clean npm run test:mocha:dds:tree",
"ci:test:mocha:non-dds": "npm run test:mocha:non-dds",
"ci:test:mocha:non-dds:coverage": "cross-env FLUID_TEST_TIMEOUT=4s c8 --no-clean npm run test:mocha:non-dds",
"ci:test:realsvc:local": "pnpm run -r --no-sort --stream --no-bail test:realsvc:local:report",
"ci:test:realsvc:local:coverage": "c8 --no-clean pnpm recursive --no-sort --stream --no-bail run test:realsvc:local:report",
"ci:test:realsvc:tinylicious": "pnpm run -r --no-sort --stream --no-bail test:realsvc:tinylicious:report",
Expand Down Expand Up @@ -110,6 +120,11 @@
"test:memory-profiling:report": "pnpm run -r --no-sort --stream --no-bail test:memory-profiling:report -- --reporterOptions reportDir=./memoryProfilingOutput",
"test:mocha": "pnpm run -r --no-sort --stream --no-bail test:mocha --color",
"test:mocha:bail": "pnpm run -r --no-sort --stream test:mocha",
"test:mocha:dds:merge-tree:farm": "pnpm run --filter ./packages/dds/merge-tree --no-sort --stream --no-bail test:mocha:esm:farm --color",
"test:mocha:dds:merge-tree:unit": "pnpm run --filter ./packages/dds/merge-tree --no-sort --stream --no-bail test:mocha:esm:unit --color",
"test:mocha:dds:other": "pnpm run --filter \"./packages/dds/**\" --filter !./packages/dds/tree --filter !./packages/dds/merge-tree --no-sort --stream --no-bail test:mocha --color",
"test:mocha:dds:tree": "pnpm run --filter ./packages/dds/tree --no-sort --stream --no-bail test:mocha --color",
"test:mocha:non-dds": "pnpm run --filter \"!./packages/dds/**\" --no-sort --stream --no-bail test:mocha --color",
"test:realsvc": "pnpm run -r --no-sort --stream --no-bail test:realsvc",
"test:stress": "pnpm run -r --no-sort --stream --no-bail test:stress",
"tsc": "fluid-build --task tsc",
Expand Down
13 changes: 13 additions & 0 deletions packages/dds/merge-tree/.mocharc.farm.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/

"use strict";

const getFluidTestMochaConfig = require("@fluid-internal/mocha-test-setup/mocharc-common");

const config = getFluidTestMochaConfig(__dirname);
config.spec = ["lib/test/*Farm*.spec.js", "lib/test/beastTest*.spec.js"];
config.parallel = true;
module.exports = config;
12 changes: 12 additions & 0 deletions packages/dds/merge-tree/.mocharc.unit.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/

"use strict";

const getFluidTestMochaConfig = require("@fluid-internal/mocha-test-setup/mocharc-common");

const config = getFluidTestMochaConfig(__dirname);
config.ignore = [...(config.ignore || []), "**/test/*Farm*", "**/test/beastTest*"];
module.exports = config;
2 changes: 2 additions & 0 deletions packages/dds/merge-tree/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@
"test:mocha": "npm run test:mocha:esm && echo skipping cjs to avoid overhead - npm run test:mocha:cjs",
"test:mocha:cjs": "cross-env FLUID_TEST_MODULE_SYSTEM=CJS mocha",
"test:mocha:esm": "mocha",
"test:mocha:esm:farm": "mocha --config .mocharc.farm.cjs",
"test:mocha:esm:unit": "mocha --config .mocharc.unit.cjs",
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
"test:stress": "cross-env FUZZ_STRESS_RUN=1 FUZZ_TEST_COUNT=normal npm run test:mocha",
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
Expand Down
6 changes: 3 additions & 3 deletions scripts/pack-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ mkdir $STAGING_PATH/test-files/
# Note: use of package's pack:tests is only supported for pnpm as PACKAGE_MANAGER.
if [ -f ".releaseGroup" ]; then
if [ "$PACKAGE_MANAGER" == "pnpm" ]; then
flub exec --no-private --concurrency=1 --releaseGroup $RELEASE_GROUP -- "pnpm --if-present pack:tests"
flub exec --no-private --concurrency=4 --releaseGroup $RELEASE_GROUP -- "pnpm --if-present pack:tests"
fi
flub exec --no-private --concurrency=1 --releaseGroup $RELEASE_GROUP -- "$PACKAGE_MANAGER pack" && \
flub exec --no-private --concurrency=1 --releaseGroup $RELEASE_GROUP -- "mv -t $STAGING_PATH/pack/tarballs/ ./*.tgz" && \
flub exec --no-private --concurrency=4 --releaseGroup $RELEASE_GROUP -- "$PACKAGE_MANAGER pack" && \
flub exec --no-private --concurrency=4 --releaseGroup $RELEASE_GROUP -- "mv -t $STAGING_PATH/pack/tarballs/ ./*.tgz" && \
flub exec --no-private --releaseGroup $RELEASE_GROUP -- "[ ! -f ./*test-files.tar ] || (echo 'test files found' && mv -t $STAGING_PATH/test-files/ ./*test-files.tar)"

else
Expand Down
12 changes: 7 additions & 5 deletions tools/pipelines/build-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,17 @@ extends:
telemetry: ${{ eq(variables['Build.Reason'], 'IndividualCI') }}
shouldShip: ${{ or(eq(variables['release'], 'release'), eq(variables['release'], 'prerelease')) }}
taskTest:
# This check must be run after the build, since it relies on built files being present. Eventually it might be moved
# to the "pack" stage since it can use the already-packed packages in that case. As it is the pipeline packs some
# packages twice.
- { name: "ci:test:jest", jobName: "JestTest" }
- { name: "ci:test:realsvc:tinylicious", jobName: "RealsvcTinyliciousTest" }
- { name: "ci:test:stress:tinylicious", jobName: "StressTinyliciousTest" }
- { name: "ci:check:are-the-types-wrong", jobName: "AreTheTypesWrong" }
# AreTheTypesWrong moved to build job via taskCheckAreTheTypesWrong
taskCheckAreTheTypesWrong: true
coverageTests:
- { name: "ci:test:mocha", jobName: "MochaTest" }
- { name: "ci:test:mocha:dds:tree", jobName: "MochaTestDdsTree" }
- { name: "ci:test:mocha:dds:merge-tree:farm", jobName: "MochaTestDdsMergeTreeFarm" }
- { name: "ci:test:mocha:dds:merge-tree:unit", jobName: "MochaTestDdsMergeTreeUnit" }
- { name: "ci:test:mocha:dds:other", jobName: "MochaTestDdsOther" }
- { name: "ci:test:mocha:non-dds", jobName: "MochaTestNonDds" }
- { name: "ci:test:realsvc:local", jobName: "RealsvcLocalTest" }
testResultDirs:
- nyc/examples
Expand Down
Loading
Loading