-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
ci: use nx for task orchestration for build/test/lint/type-check #26928
Draft
Hotell
wants to merge
44
commits into
microsoft:master
Choose a base branch
from
Hotell:hotell/build/ci/use-nx
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
a7128cc
ci: use nx for task orchestration for build/test/lint/type-check
Hotell ceaf32e
chore: migrate to nx 14.0.0
Hotell c78495b
chore: migrate to nx 14.8.6
Hotell e4eaaee
chore: migrate to nx 15.0.0
Hotell c5941ff
chore: migrate to nx 15.6.3
Hotell 5751c03
chore: update run-affected with multiple targets api supported in nx …
Hotell d3044aa
chore: dedup deps after rebase including jest 28
Hotell eeaaee9
chore: remove lint target dependency on build for nx
Hotell af065e5
chore: migrate to node 16
Hotell 9ee4b0b
chore: bump to node 16.18.1 to be aligned with codesandbox CI
Hotell 6db952a
fix(scripts-generators): lint issues caused by nx migrations
Hotell d9f52d5
fix(global-context): remove non-existend NodeJS.Glob after node 16 ty…
Hotell daa4760
ci: run nx for all projects for better metrics
Hotell 0d87151
chore(nx): update targetDefaults to match lage.config
Hotell bf95c6a
chore: migrate to nx 15.8.1 (introducing project.json migration with …
Hotell d7a4ba5
chore: migrate to nx 15.8.3
Hotell 3d5a2ee
chore: migrate to nx 15.8.5
Hotell aa9b990
ci: add new job PR to get more data
Hotell af847c1
feat(react-conformance): add new TS config api to be able to specify …
Hotell 8d9e976
chore(react-conformance): hardcode resolving proper tsconfig for conf…
Hotell 8daa600
chore(react-components): use swc/jest for tests
Hotell 74f3b8f
chore(react): remove unused common/ code and simplify eslint config t…
Hotell e11b84c
ci: try fixing yarn install
Hotell ac3e3de
ci: narrow down pipelines to get nx vs lage comparison
Hotell d5e14af
test: improve jest execution speeds by removing -i and --coverage fro…
Hotell 22465fb
test: try using maxworkers for v9 to improve jest execution speeds on CI
Hotell 5b5d854
test: use isolatedModules for all ts-jest configs to lower memory foo…
Hotell ac47f2a
feat: integrate lerna with nx
Hotell 202a3a7
chore(lage): remove redundant task dependency config
Hotell 3ee08f6
feat(scripts/tasks): implement type-check command to improve type che…
Hotell fa998f0
chore: use ts-solution config for v8 and emit only declaration in v0 …
Hotell fd37bce
chore(scripts-tasks): disable path aliases when running build task fo…
Hotell 341df5e
chore(scripts-tasks): improve copy-comiled task execution by 99%
Hotell e180086
chore(vr-tests): remove 'build' task for vr-tests to unify and not ru…
Hotell 0a1e2dd
ci: add logs to determine what's wrong with yarn install
Hotell 6dbc149
chore(fluentui/e2e): speedup ts processing and make it work with no-b…
Hotell e784acb
ci: add new pipeline for only e2e without all deps build needed
Hotell 2a847fc
chore(react-18-tests-v8): make e2e work withou no-build DX
Hotell 9624833
ci: create gha for PR
Hotell 1455d09
fix(scripts-storybook): update loadWorkspaceAddon template to call va…
Hotell d2ccd21
test(fluentui/react): fix initial global leaks that were causing OOM …
Hotell 4e11c94
chore: migrate to nx 15.8.7
Hotell f49121b
ci(ado): add nx affected pipeline for testing
Hotell 1f0b7cc
docs: push perf docs
Hotell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
name: PR CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
prepare_env: | ||
name: Prepare environment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.18.1' | ||
|
||
- name: Cache node_modules | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Cache Cypress Binary | ||
id: cache-cypress-binary | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/Cypress | ||
key: ${{ runner.os }}-cypress-binary-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-cypress-binary-${{ hashFiles('**/yarn.lock') }} | ||
${{ runner.os }}-cypress-binary- | ||
|
||
- name: Install packages | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' || steps.cache-cypress-binary.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive | ||
|
||
- name: List the state of node modules | ||
run: yarn list | ||
|
||
- name: List node modules bin | ||
continue-on-error: true | ||
run: | | ||
pwd | ||
ls -la ~/.cache/ | ||
find . -name "node_modules" -prune | ||
|
||
build_test_lint: | ||
needs: [prepare_env] | ||
name: Build, Test, Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.18.1' | ||
|
||
- name: Cache node_modules | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: List node modules bin | ||
run: | | ||
pwd | ||
find . -name "node_modules" -prune | ||
|
||
- name: Install packages | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive | ||
|
||
- name: Build, Test, Lint | ||
run: yarn nx run-many --targets=build,test,lint,type-check --parallel=8 | ||
|
||
build: | ||
needs: [prepare_env] | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.18.1' | ||
|
||
- name: Cache node_modules | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: List node modules bin | ||
run: | | ||
pwd | ||
find . -name "node_modules" -prune | ||
|
||
- name: Install packages | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive | ||
|
||
- name: Build | ||
run: yarn nx run-many --targets=build --parallel=8 | ||
|
||
e2e: | ||
needs: [prepare_env] | ||
name: E2E target | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.18.1' | ||
|
||
- name: Cache node_modules | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Cache Cypress Binary | ||
id: cache-cypress-binary | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/Cypress | ||
key: ${{ runner.os }}-cypress-binary-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-cypress-binary-${{ hashFiles('**/yarn.lock') }} | ||
${{ runner.os }}-cypress-binary- | ||
|
||
- name: Install packages | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' || steps.cache-cypress-binary.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive | ||
|
||
- name: E2E | ||
run: yarn nx run-many --targets=e2e | ||
|
||
deploy: | ||
needs: [prepare_env] | ||
name: Deploy PR web | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.18.1' | ||
|
||
- name: Cache node_modules | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install packages | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive | ||
|
||
- name: Build storybook | ||
run: yarn nx run-many --targets=build-storybook --parallel=8 | ||
|
||
- name: Bundle | ||
run: yarn nx run-many --targets=bundle --parallel=8 | ||
|
||
# - uses: actions/checkout@v3 | ||
# - uses: actions/setup-node@v3 | ||
# with: | ||
# node-version-file: 'package.json' | ||
# cache: 'yarn' | ||
# cache-dependency-path: '**/yarn.lock' | ||
# - name: install dependencies | ||
# run: yarn install --frozen-lockfile | ||
# - name: NX run-many | ||
# run: yarn nx run-many --targets=build,test,lint,type-check --parallel=8 | ||
|
||
# - name: Upload npm package | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: npm-package | ||
# path: abc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "@fluentui/perf-test-react-components", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"projectType": "application", | ||
"implicitDependencies": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "@fluentui/perf-test", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"projectType": "application", | ||
"implicitDependencies": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "@fluentui/pr-deploy-site", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"projectType": "application", | ||
"implicitDependencies": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "@fluentui/public-docsite-resources", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"projectType": "application", | ||
"implicitDependencies": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
"description": "Fluent UI React v9 documentation", | ||
"scripts": { | ||
"build": "just-scripts build", | ||
"build-storybook": "build-storybook -o ./dist/storybook --docs && node ./.storybook/fix-title.js 'Fluent UI React v9' ../dist", | ||
"build-storybook": "build-storybook --no-manager-cache -o ./dist/storybook --docs && node ./.storybook/fix-title.js 'Fluent UI React v9' ../dist", | ||
"chromatic:branch": "npx [email protected] --project-token $CHROMATIC_PROJECT_TOKEN --exit-zero-on-changes --build-script-name build-storybook", | ||
"chromatic": "npx [email protected] --project-token $CHROMATIC_PROJECT_TOKEN --exit-zero-on-changes --build-script-name build-storybook --branch-name microsoft:master", | ||
"clean": "just-scripts clean", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "@fluentui/public-docsite-v9", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"projectType": "application", | ||
"implicitDependencies": [], | ||
"tags": ["platform:web"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "@fluentui/public-docsite", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"projectType": "application", | ||
"implicitDependencies": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,29 @@ | ||
import * as path from 'path'; | ||
import { baseConfig } from '@fluentui/scripts-cypress'; | ||
import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin'; | ||
|
||
registerTsPaths({ | ||
configFile: path.resolve(__dirname, '../../tsconfig.base.v8.json'), | ||
config: baseConfig.component.devServer.webpackConfig, | ||
}); | ||
|
||
export default baseConfig; | ||
|
||
// TODO copied from scripts/storybook/utils - make it generic helper (out of SB domain) | ||
function registerTsPaths(options: { configFile: string; config: import('webpack').Configuration }) { | ||
// eslint-disable-next-line @typescript-eslint/no-shadow | ||
const { config, configFile } = options; | ||
const tsPaths = new TsconfigPathsPlugin({ | ||
configFile, | ||
}); | ||
|
||
config.resolve = config.resolve ?? {}; | ||
config.resolve.plugins = config.resolve.plugins ?? []; | ||
|
||
// remove existing to prevent multiple tspaths plugin | ||
config.resolve.plugins = config.resolve.plugins.filter(plugin => !(plugin instanceof TsconfigPathsPlugin)); | ||
|
||
config.resolve.plugins.push(tsPaths); | ||
|
||
return config; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "@fluentui/react-18-tests-v8", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"projectType": "application", | ||
"implicitDependencies": [] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕵 fluentuiv8 Open the Visual Regressions report to inspect the 2 screenshots
✅ There was 2 screenshots added, 0 screenshots removed, 1045 screenshots unchanged, 0 screenshots with different dimensions and 0 screenshots with visible difference.
unknown 2 screenshots