diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000..1f64bbcee3236 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,48 @@ +node_modules +.node_modules +built/* +test-args.txt +~*.docx +\#*\# +.\#* +src/harness/*.js +src/compiler/diagnosticInformationMap.generated.ts +src/compiler/diagnosticMessages.generated.json +src/parser/diagnosticInformationMap.generated.ts +src/parser/diagnosticMessages.generated.json +rwc-report.html +*.swp +build.json +*.actual +*.config +scripts/debug.bat +scripts/run.bat +scripts/word2md.js +scripts/buildProtocol.js +scripts/ior.js +scripts/authors.js +scripts/configurePrerelease.js +scripts/open-user-pr.js +scripts/open-cherry-pick-pr.js +scripts/processDiagnosticMessages.d.ts +scripts/processDiagnosticMessages.js +scripts/produceLKG.js +scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js +scripts/generateLocalizedDiagnosticMessages.js +scripts/*.js.map +scripts/typings/ +coverage/ +internal/ +**/.DS_Store +.settings +**/.vs +.idea +yarn.lock +yarn-error.log +.parallelperf.* +.failed-tests +TEST-results.xml +package-lock.json +tests +.vscode +.git \ No newline at end of file diff --git a/.npmignore b/.npmignore index 482633f48fc40..2144451e3e84d 100644 --- a/.npmignore +++ b/.npmignore @@ -29,3 +29,5 @@ package-lock.json yarn.lock CONTRIBUTING.md TEST-results.xml +.dockerignore +Dockerfile \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000..8898a69af6d38 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +# We use this dockerfile to build a packed tarfile which we import in our `docker` tests +FROM node:current +COPY . /typescript +WORKDIR /typescript +RUN npm install +RUN npm i -g gulp-cli +RUN gulp configure-insiders && gulp LKG && gulp clean && npm pack . \ No newline at end of file diff --git a/src/harness/runnerbase.ts b/src/harness/runnerbase.ts index b29ebb7f92009..ce56772927e41 100644 --- a/src/harness/runnerbase.ts +++ b/src/harness/runnerbase.ts @@ -1,4 +1,4 @@ -type TestRunnerKind = CompilerTestKind | FourslashTestKind | "project" | "rwc" | "test262" | "user" | "dt"; +type TestRunnerKind = CompilerTestKind | FourslashTestKind | "project" | "rwc" | "test262" | "user" | "dt" | "docker"; type CompilerTestKind = "conformance" | "compiler"; type FourslashTestKind = "fourslash" | "fourslash-shims" | "fourslash-shims-pp" | "fourslash-server"; diff --git a/src/testRunner/externalCompileRunner.ts b/src/testRunner/externalCompileRunner.ts index c3b2ef3e6ec29..e40f8115e5955 100644 --- a/src/testRunner/externalCompileRunner.ts +++ b/src/testRunner/externalCompileRunner.ts @@ -106,6 +106,77 @@ ${stripAbsoluteImportPaths(result.stderr.toString().replace(/\r\n/g, "\n"))}`; } } +class DockerfileRunner extends ExternalCompileRunnerBase { + readonly testDir = "tests/cases/docker/"; + kind(): TestRunnerKind { + return "docker"; + } + initializeTests(): void { + // Read in and evaluate the test list + const testList = this.tests && this.tests.length ? this.tests : this.enumerateTestFiles(); + + // tslint:disable-next-line:no-this-assignment + const cls = this; + describe(`${this.kind()} code samples`, function(this: Mocha.ISuiteCallbackContext) { + this.timeout(cls.timeout); // 20 minutes + before(() => { + cls.exec("docker", ["build", ".", "-t", "typescript/typescript"], { cwd: Harness.IO.getWorkspaceRoot() }); // cached because workspace is hashed to determine cacheability + }); + for (const test of testList) { + const directory = typeof test === "string" ? test : test.file; + const cwd = path.join(Harness.IO.getWorkspaceRoot(), cls.testDir, directory); + it(`should build ${directory} successfully`, () => { + const imageName = `tstest/${directory}`; + cls.exec("docker", ["build", "--no-cache", ".", "-t", imageName], { cwd }); // --no-cache so the latest version of the repos referenced is always fetched + const cp: typeof import("child_process") = require("child_process"); + Harness.Baseline.runBaseline(`${cls.kind()}/${directory}.log`, cls.report(cp.spawnSync(`docker`, ["run", imageName], { cwd, timeout: cls.timeout, shell: true }))); + }); + } + }); + } + + private timeout = 1_200_000; // 20 minutes; + private exec(command: string, args: string[], options: { cwd: string, timeout?: number }): void { + const cp: typeof import("child_process") = require("child_process"); + const stdio = isWorker ? "pipe" : "inherit"; + const res = cp.spawnSync(command, args, { timeout: this.timeout, shell: true, stdio, ...options }); + if (res.status !== 0) { + throw new Error(`${command} ${args.join(" ")} for ${options.cwd} failed: ${res.stderr && res.stderr.toString()}`); + } + } + report(result: ExecResult) { + // tslint:disable-next-line:no-null-keyword + return result.status === 0 && !result.stdout.length && !result.stderr.length ? null : `Exit Code: ${result.status} +Standard output: +${sanitizeDockerfileOutput(result.stdout.toString())} + + +Standard error: +${sanitizeDockerfileOutput(result.stderr.toString())}`; + } +} + +function sanitizeDockerfileOutput(result: string): string { + return stripAbsoluteImportPaths(sanitizeTimestamps(stripANSIEscapes(normalizeNewlines(result)))); +} + +function normalizeNewlines(result: string): string { + return result.replace(/\r\n/g, "\n"); +} + +function stripANSIEscapes(result: string): string { + return result.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, ""); +} + +function sanitizeTimestamps(result: string): string { + return result.replace(/\[\d?\d:\d\d:\d\d (A|P)M\]/g, "[XX:XX:XX XM]") + .replace(/\d+(\.\d+)? seconds?/g, "? seconds") + .replace(/\d+(\.\d+)? minutes?/g, "") + .replace(/\d+(\.\d+)?s/g, "?s") + .replace(/\d+.\d+.\d+-insiders.\d\d\d\d\d\d\d\d/g, "X.X.X-insiders.xxxxxxxx"); +} + + /** * Import types and some other error messages use absolute paths in errors as they have no context to be written relative to; * This is problematic for error baselines, so we grep for them and strip them out. diff --git a/src/testRunner/runner.ts b/src/testRunner/runner.ts index be46d935297bd..816b2dff370cf 100644 --- a/src/testRunner/runner.ts +++ b/src/testRunner/runner.ts @@ -40,6 +40,8 @@ function createRunner(kind: TestRunnerKind): RunnerBase { return new UserCodeRunner(); case "dt": return new DefinitelyTypedRunner(); + case "docker": + return new DockerfileRunner(); } return ts.Debug.fail(`Unknown runner kind ${kind}`); } @@ -172,6 +174,9 @@ function handleTestConfig() { case "dt": runners.push(new DefinitelyTypedRunner()); break; + case "docker": + runners.push(new DockerfileRunner()); + break; } } } @@ -194,6 +199,7 @@ function handleTestConfig() { // CRON-only tests if (process.env.TRAVIS_EVENT_TYPE === "cron") { runners.push(new UserCodeRunner()); + runners.push(new DockerfileRunner()); } } if (runUnitTests === undefined) { diff --git a/tests/baselines/reference/docker/azure-sdk.log b/tests/baselines/reference/docker/azure-sdk.log new file mode 100644 index 0000000000000..3d2374b1547a8 --- /dev/null +++ b/tests/baselines/reference/docker/azure-sdk.log @@ -0,0 +1,95 @@ +Exit Code: 1 +Standard output: + + +Rush Multi-Project Build Tool 5.7.3 - https://rushjs.io + + +Starting "rush rebuild" + +Executing a maximum of 1 simultaneous processes... + +[@azure/abort-controller] started +1 of 18: [@azure/abort-controller] completed successfully in ? seconds +[@azure/cosmos] started +2 of 18: [@azure/cosmos] completed successfully in ? seconds +[@azure/event-hubs] started +3 of 18: [@azure/event-hubs] completed successfully in ? seconds +[@azure/service-bus] started +Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md +[@azure/storage-blob] started +5 of 18: [@azure/storage-blob] completed successfully in ? seconds +[@azure/storage-datalake] started +6 of 18: [@azure/storage-datalake] completed successfully in ? seconds +[@azure/storage-file] started +7 of 18: [@azure/storage-file] completed successfully in ? seconds +[@azure/storage-queue] started +8 of 18: [@azure/storage-queue] completed successfully in ? seconds +[@azure/template] started +9 of 18: [@azure/template] completed successfully in ? seconds +[@azure/core-http] started +10 of 18: [@azure/core-http] completed successfully in ? seconds +[@azure/core-paging] started +11 of 18: [@azure/core-paging] completed successfully in ? seconds +[@azure/event-processor-host] started +12 of 18: [@azure/event-processor-host] completed successfully in ? seconds +[testhub] started +13 of 18: [testhub] completed successfully in ? seconds +[@azure/identity] started +14 of 18: [@azure/identity] completed successfully in ? seconds +[@azure/core-amqp] started +[@azure/keyvault-certificates] started +15 of 18: [@azure/keyvault-certificates] completed successfully in ? seconds +[@azure/keyvault-keys] started +16 of 18: [@azure/keyvault-keys] completed successfully in ? seconds +[@azure/keyvault-secrets] started +17 of 18: [@azure/keyvault-secrets] completed successfully in ? seconds + +SUCCESS (16) +================================ +@azure/abort-controller (? seconds) +@azure/core-http (? seconds) +@azure/core-paging (? seconds) +@azure/cosmos (? seconds) +@azure/event-hubs (? seconds) +@azure/event-processor-host (? seconds) +@azure/identity (? seconds) +@azure/keyvault-certificates (? seconds) +@azure/keyvault-keys (? seconds) +@azure/keyvault-secrets (? seconds) +@azure/storage-blob (? seconds) +@azure/storage-datalake (? seconds) +@azure/storage-file (? seconds) +@azure/storage-queue (? seconds) +@azure/template (? seconds) +testhub (? seconds) +================================ + +SUCCESS WITH WARNINGS (1) +================================ +@azure/service-bus (? seconds) +Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md +================================ + +FAILURE (1) +================================ +@azure/core-amqp (? seconds) +>>> @azure/core-amqp +tsc -p . && rollup -c 2>&1 +src/errors.ts(579,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'typeof ConditionErrorNameMapper'. +src/errors.ts(600,34): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'typeof SystemErrorConditionMapper'. +src/errors.ts(601,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'typeof ConditionErrorNameMapper'. +================================ + + +Error: Project(s) failed to build +rush rebuild - Errors! ( ? seconds) + + + +Standard error: +Your version of Node.js (12.4.0) has not been tested with this release of Rush. The Rush team will not accept issue reports for it. Please consider upgrading Rush or downgrading Node.js. +4 of 18: [@azure/service-bus] completed with warnings in ? seconds + +14 of 18: [@azure/core-amqp] failed to build! +[@azure/core-amqp] Returned error code: 2 diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log new file mode 100644 index 0000000000000..e551d2ead88b1 --- /dev/null +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -0,0 +1,416 @@ +Exit Code: 1 +Standard output: + + +Rush Multi-Project Build Tool 5.6.0 - https://rushjs.io + + +Starting "rush rebuild" + +Executing a maximum of 1 simultaneous processes... + +[@uifabric/prettier-rules] started +1 of 40: [@uifabric/prettier-rules] completed successfully in ? seconds +[@uifabric/tslint-rules] started +2 of 40: [@uifabric/tslint-rules] completed successfully in ? seconds +[@uifabric/codepen-loader] started +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +[@uifabric/build] started +4 of 40: [@uifabric/build] completed successfully in ? seconds +[@uifabric/migration] started +5 of 40: [@uifabric/migration] completed successfully in ? seconds +[@uifabric/set-version] started +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +[@uifabric/merge-styles] started +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +[@uifabric/jest-serializer-merge-styles] started +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +[@uifabric/test-utilities] started +9 of 40: [@uifabric/test-utilities] completed successfully in ? seconds +[@uifabric/utilities] started +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +[@uifabric/styling] started +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +[@uifabric/file-type-icons] started +12 of 40: [@uifabric/file-type-icons] completed successfully in ? seconds +[@uifabric/foundation] started +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. + ● createFactory › passes componentProps without userProps + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at Object. (src/slots.test.tsx:205:73) + + ● createFactory › passes userProp string as child + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at Object. (src/slots.test.tsx:210:76) + + ● createFactory › passes userProp integer as child + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at Object. (src/slots.test.tsx:220:76) + + ● createFactory › passes userProp string as defaultProp + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at Object. (src/slots.test.tsx:225:92) + + ● createFactory › passes userProp integer as defaultProp + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at Object. (src/slots.test.tsx:235:92) + + ● createFactory › merges userProps over componentProps + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at Object. (src/slots.test.tsx:245:84) + + ● createFactory › renders div and userProp integer as children + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at Object. (src/slots.test.tsx:255:86) + + ● createFactory › renders div and userProp string as children + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at Object. (src/slots.test.tsx:266:86) + + ● createFactory › renders userProp span function without component props + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at Object. (src/slots.test.tsx:288:61) + + ● createFactory › renders userProp span function with component props + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at Object. (src/slots.test.tsx:301:61) + + ● createFactory › renders userProp span component with component props + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at Object. (src/slots.test.tsx:314:61) + + ● createFactory › passes props and type arguments to userProp function + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at Object. (src/slots.test.tsx:334:43) + + ● getSlots › creates slots and passes merged props to them + + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at _renderSlot (src/slots.tsx:221:100) + at Object.slot [as testSlot1] (src/slots.tsx:142:16) + at Object. (src/slots.test.tsx:399:24) + +[XX:XX:XX XM] x Error detected while running 'jest' +[XX:XX:XX XM] x ------------------------------------ +[XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node /office-ui-fabric-react/common/temp/node_modules/jest/bin/jest.js --config /office-ui-fabric-react/packages/foundation/jest.config.js --passWithNoTests --colors + at ChildProcess. (/office-ui-fabric-react/common/temp/node_modules/.registry.npmjs.org/just-scripts-utils/0.8.1/node_modules/just-scripts-utils/lib/exec.js:70:31) + at ChildProcess.emit (events.js:200:13) + at ChildProcess.EventEmitter.emit (domain.js:494:23) + at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) +[XX:XX:XX XM] x ------------------------------------ +[XX:XX:XX XM] x finished 'validate' in ?s with errors +[XX:XX:XX XM] x finished 'build' in ?s with errors +[XX:XX:XX XM] x Error previously detected. See above for error messages. +[@uifabric/icons] started +38 of 40: [@uifabric/icons] completed successfully in ? seconds +[@uifabric/webpack-utils] started +39 of 40: [@uifabric/webpack-utils] completed successfully in ? seconds + +SUCCESS (8) +================================ +@uifabric/build (? seconds) +@uifabric/file-type-icons (? seconds) +@uifabric/icons (? seconds) +@uifabric/migration (? seconds) +@uifabric/prettier-rules (? seconds) +@uifabric/test-utilities (? seconds) +@uifabric/tslint-rules (? seconds) +@uifabric/webpack-utils (? seconds) +================================ + +SUCCESS WITH WARNINGS (6) +================================ +@uifabric/codepen-loader (? seconds) +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. + +@uifabric/jest-serializer-merge-styles (? seconds) +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. + +@uifabric/merge-styles (? seconds) +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. + +@uifabric/set-version (? seconds) +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. + +@uifabric/styling (? seconds) +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. + +@uifabric/utilities (? seconds) +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +================================ + +BLOCKED (25) +================================ +@uifabric/api-docs +@uifabric/azure-themes +@uifabric/charting +@uifabric/date-time +@uifabric/example-app-base +@uifabric/experiments +@uifabric/fabric-website +@uifabric/fabric-website-resources +@uifabric/fluent-theme +@uifabric/foundation-scenarios +@uifabric/lists +@uifabric/pr-deploy-site +@uifabric/react-cards +@uifabric/theme-samples +@uifabric/variants +a11y-tests +dom-tests +office-ui-fabric-react +perf-test +server-rendered-app +ssr-tests +test-bundles +theming-designer +todo-app +vr-tests +================================ + +FAILURE (1) +================================ +@uifabric/foundation (? seconds) +ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. + ● createFactory › passes componentProps without userProps + RangeError: Invalid array length + + 189 | for (const props of allProps) { + 190 | classNames.push(props && props.className); + > 191 | assign(finalProps, ...(props as any)); + | ^ + 192 | } + 193 | +[...179 lines omitted...] + 193 | + 194 | finalProps.className = mergeStyles(defaultStyles, classNames); + + at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22) + at _constructFinalProps (src/slots.tsx:191:11) + at result (src/slots.tsx:88:24) + at _renderSlot (src/slots.tsx:221:100) + at Object.slot [as testSlot1] (src/slots.tsx:142:16) + at Object. (src/slots.test.tsx:399:24) +[XX:XX:XX XM] x Error detected while running 'jest' +[XX:XX:XX XM] x ------------------------------------ +[XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node /office-ui-fabric-react/common/temp/node_modules/jest/bin/jest.js --config /office-ui-fabric-react/packages/foundation/jest.config.js --passWithNoTests --colors + at ChildProcess. (/office-ui-fabric-react/common/temp/node_modules/.registry.npmjs.org/just-scripts-utils/0.8.1/node_modules/just-scripts-utils/lib/exec.js:70:31) + at ChildProcess.emit (events.js:200:13) + at ChildProcess.EventEmitter.emit (domain.js:494:23) + at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) +[XX:XX:XX XM] x ------------------------------------ +[XX:XX:XX XM] x finished 'validate' in ?s with errors +[XX:XX:XX XM] x finished 'build' in ?s with errors +[XX:XX:XX XM] x Error previously detected. See above for error messages. +================================ + + +Error: Project(s) failed to build +rush rebuild - Errors! ( ? seconds) + + + +Standard error: +Your version of Node.js (12.4.0) has not been tested with this release of Rush. The Rush team will not accept issue reports for it. Please consider upgrading Rush or downgrading Node.js. +3 of 40: [@uifabric/codepen-loader] completed with warnings in ? seconds +6 of 40: [@uifabric/set-version] completed with warnings in ? seconds +7 of 40: [@uifabric/merge-styles] completed with warnings in ? seconds +8 of 40: [@uifabric/jest-serializer-merge-styles] completed with warnings in ? seconds +10 of 40: [@uifabric/utilities] completed with warnings in ? seconds +11 of 40: [@uifabric/styling] completed with warnings in ? seconds + +12 of 40: [@uifabric/foundation] failed to build! +13 of 40: [@uifabric/experiments] blocked by [@uifabric/foundation]! +14 of 40: [@uifabric/fabric-website] blocked by [@uifabric/foundation]! +15 of 40: [@uifabric/pr-deploy-site] blocked by [@uifabric/foundation]! +16 of 40: [@uifabric/react-cards] blocked by [@uifabric/foundation]! +17 of 40: [theming-designer] blocked by [@uifabric/foundation]! +18 of 40: [vr-tests] blocked by [@uifabric/foundation]! +19 of 40: [dom-tests] blocked by [@uifabric/foundation]! +20 of 40: [perf-test] blocked by [@uifabric/foundation]! +21 of 40: [test-bundles] blocked by [@uifabric/foundation]! +22 of 40: [office-ui-fabric-react] blocked by [@uifabric/foundation]! +23 of 40: [@uifabric/api-docs] blocked by [@uifabric/foundation]! +24 of 40: [@uifabric/fabric-website-resources] blocked by [@uifabric/foundation]! +25 of 40: [a11y-tests] blocked by [@uifabric/foundation]! +26 of 40: [ssr-tests] blocked by [@uifabric/foundation]! +27 of 40: [@uifabric/azure-themes] blocked by [@uifabric/foundation]! +28 of 40: [@uifabric/charting] blocked by [@uifabric/foundation]! +29 of 40: [@uifabric/date-time] blocked by [@uifabric/foundation]! +30 of 40: [@uifabric/example-app-base] blocked by [@uifabric/foundation]! +31 of 40: [@uifabric/foundation-scenarios] blocked by [@uifabric/foundation]! +32 of 40: [@uifabric/lists] blocked by [@uifabric/foundation]! +33 of 40: [@uifabric/fluent-theme] blocked by [@uifabric/foundation]! +34 of 40: [@uifabric/theme-samples] blocked by [@uifabric/foundation]! +35 of 40: [@uifabric/variants] blocked by [@uifabric/foundation]! +36 of 40: [server-rendered-app] blocked by [@uifabric/foundation]! +37 of 40: [todo-app] blocked by [@uifabric/foundation]! +[@uifabric/foundation] Returned error code: 1 diff --git a/tests/cases/docker/README.md b/tests/cases/docker/README.md new file mode 100644 index 0000000000000..f9b12e1a05214 --- /dev/null +++ b/tests/cases/docker/README.md @@ -0,0 +1,21 @@ +Integrations +============ + +This repository contains `Dockerfile`s that describe how to build open source projects (usually those with complex build tasks) with a specific version of typescript. These are used for extended validations of a given typescript build. + +Contributing +----------- + +To add a new test: +* Create a new folder with the name of the project +* Create a `Dockerfile` within that folder +* The `Dockerfile` will be built with `docker build . -t tstest/folder` and then run with `docker run tstest/folder` +* Write the dockerfile such that it can build the target project and injects the typescript package from the `typescript/typescript` image (which should have a tar file at `/typescript/typescript-*.tgz`) + +Debugging +--------- + +You can open a test's container with an interactive shell to debug with `docker run -it --entrypoint "/bin/sh" tstest/folder`. +If you want to remote debug a typescript process within a container, you'll need to forward the port you instruct the +compiler or language server to listen on by passing `--expose PORT` where `PORT` is the port number you'd like forwarded to the +host. diff --git a/tests/cases/docker/azure-sdk/Dockerfile b/tests/cases/docker/azure-sdk/Dockerfile new file mode 100644 index 0000000000000..e65643445aa79 --- /dev/null +++ b/tests/cases/docker/azure-sdk/Dockerfile @@ -0,0 +1,19 @@ +FROM node:current +RUN npm install -g @microsoft/rush +RUN git clone https://github.com/Azure/azure-sdk-for-js.git /azure-sdk +WORKDIR /azure-sdk +RUN git pull +RUN rush update +WORKDIR /azure-sdk/sdk/core/core-http +# Sync up all TS versions used internally so they're all linked from a known location +RUN rush add -p "typescript@3.5.1" --exact --dev -m +# Relink installed TSes to built TS +WORKDIR /azure-sdk/common/temp/node_modules/.registry.npmjs.org/typescript/3.5.1/node_modules +RUN rm -rf typescript +COPY --from=typescript/typescript /typescript/typescript-*.tgz /typescript.tgz +RUN mkdir /typescript +RUN tar -xzvf /typescript.tgz -C /typescript +RUN ln -s /typescript/package ./typescript +WORKDIR /azure-sdk +ENTRYPOINT [ "rush" ] +CMD [ "rebuild", "--parallelism", "1" ] \ No newline at end of file diff --git a/tests/cases/docker/office-ui-fabric/Dockerfile b/tests/cases/docker/office-ui-fabric/Dockerfile new file mode 100644 index 0000000000000..718289fabe300 --- /dev/null +++ b/tests/cases/docker/office-ui-fabric/Dockerfile @@ -0,0 +1,20 @@ +FROM node:current +RUN npm install -g @microsoft/rush +RUN git clone https://github.com/OfficeDev/office-ui-fabric-react.git /office-ui-fabric-react +WORKDIR /office-ui-fabric-react +RUN git pull +RUN rush update +WORKDIR /office-ui-fabric-react/scripts +# Sync up all TS versions used internally so they're all linked from a known location +RUN rush add -p "typescript@3.5.1" --exact --dev -m +# Relink installed TSes to built TS +WORKDIR /office-ui-fabric-react/common/temp/node_modules/.registry.npmjs.org/typescript/3.5.1/node_modules +RUN rm -rf typescript +COPY --from=typescript/typescript /typescript/typescript-*.tgz /typescript.tgz +RUN mkdir /typescript +RUN tar -xzvf /typescript.tgz -C /typescript +RUN ln -s /typescript/package ./typescript +RUN npm i -g /typescript.tgz +WORKDIR /office-ui-fabric-react +ENTRYPOINT [ "rush" ] +CMD [ "rebuild", "--parallelism", "1" ] \ No newline at end of file