Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build definition to test TypeScript compatibility of office-ui-fabric-react #8961

Conversation

KevinTCoughlin
Copy link
Member

@KevinTCoughlin KevinTCoughlin commented May 3, 2019

Overview

This PR adds a build definition that tests the compilation of office-ui-fabric-react against a range of TypeScript versions contained in a repository I will make public once this is merged.

Initially, the build trigger is pinned to a specific branch for testing end-to-end and to avoid resource contention.

I will follow-up with an iteration that modifies the triggers to contain office-ui-fabric-react tagged releases.

Why?

The goal is to be notified when an incompatible typing is introduced so that we can:

  1. Make a decision on whether or not to break compatibility for a given version
  2. Provide a resource for partners to be aware of our TypeScript compatibility across major and minor releases of TypeScript.

Build Overview

This build definition consists of two jobs with their runtime cost (tested on free DevOps agents) described below:

Job 1 - Build & Pack OUFR (~8 mins)

  1. The first job clones this repository.
  2. The job then installs dependencies and builds office-ui-fabric-react directly.
  3. Finally it runs npm pack to produce the office-ui-fabric-react tarball and publishes it as an artifact for the second job to consume.

Note: The need for this job can likely be eliminated entirely in a subsequent iteration.

Job 2 - Compile OUFR in Sample App (~1 min per)

  1. The second job depends on the first job succeeding as it requires the office-ui-fabric-react tarball.
  2. It is a matrix job that executes a maximum of two jobs in parallel which test compatibility for a given TypeScript version.
  3. Each job clones the repository containing our sample applications consuming office-ui-fabric-react
  4. Then the office-ui-fabric-react tarball is installed to the project. This is done to ensure we are not consuming a different release via NPM.
  5. The job finally runs tsc in the root of the sample application and reports success or failure as build status.

Note: 30 seconds of the above runtime is the compliance step 😄.

Example Build Output

image


Related Issues: #8458 #8051 #7054

cc: @aftab-hassan @Vitalius1 @natalieethell @patmill

Microsoft Reviewers: Open in CodeFlow

@msft-github-bot
Copy link
Contributor

msft-github-bot commented May 3, 2019

Component perf results:

Scenario Target branch avg total (ms) PR avg total (ms) Target branch avg per item (ms) PR avg per item (ms) Is significant change Is regression
PrimaryButton 74.193 74.277 0.742 0.743 false false
BaseButton 27.281 28.222 0.273 0.282 false false
NewButton 106.388 105.189 1.064 1.052 false false
button 4.105 4.242 0.041 0.042 false false
DetailsRows without styles 157.767 156.822 1.578 1.568 false false
DetailsRows 181.331 182.799 1.813 1.828 false false
Toggles 43.559 44.112 0.436 0.441 false false
NewToggle 63.500 61.296 0.635 0.613 false false
DocumentCardTitle with truncation 21.610 22.678 0.216 0.227 false false

@size-auditor
Copy link

size-auditor bot commented May 4, 2019

Size Auditor did not detect a change in bundle size for any component!

@KevinTCoughlin KevinTCoughlin merged commit e56cb12 into microsoft:master May 9, 2019
@KevinTCoughlin KevinTCoughlin deleted the keco/typescript-compatibility-ci branch May 9, 2019 04:27
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants