Skip to content
  •  
  •  
  •  
306 changes: 153 additions & 153 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on:
push:
branches:
- master
- chore/migrate-to-eslint-flat-configs-test
pull_request:

concurrency:
Expand All @@ -23,8 +23,8 @@ env:

jobs:
main:
if: ${{ github.repository_owner == 'microsoft' }}
runs-on: macos-14-xlarge
# if: ${{ github.repository_owner == 'microsoft' }}
runs-on: ubuntu-latest
permissions:
contents: 'read'
actions: 'read'
Expand All @@ -44,7 +44,7 @@ jobs:
cache: 'yarn'
node-version: '22'

- run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)"
# - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)"

- run: yarn install --frozen-lockfile

Expand All @@ -54,156 +54,156 @@ jobs:
yarn nx g @fluentui/workspace-plugin:tsconfig-base-all --verify
yarn nx g @fluentui/workspace-plugin:normalize-package-dependencies --verify

- name: Type-check just.config.ts files
run: |
# following packages need to be build in advance:
# @fluentui/api-docs is used within apps/public-docsite-resources/just.config.ts,
# @fluentui/digest is used within packages/fluentui/perf-test-northstar/just.config.ts, thus it needs to be build in advance
#
# NOTE: we are running this via nx in order to get cache hits later on
yarn nx run-many -t build -p api-docs digest
yarn tsc -p ./tsconfig.just-scripts-configs.json

- name: 'check packages: installed dependencies versions'
run: |
yarn check:installed-dependencies-versions
# - name: Type-check just.config.ts files
# run: |
# # following packages need to be build in advance:
# # @fluentui/api-docs is used within apps/public-docsite-resources/just.config.ts,
# # @fluentui/digest is used within packages/fluentui/perf-test-northstar/just.config.ts, thus it needs to be build in advance
# #
# # NOTE: we are running this via nx in order to get cache hits later on
# yarn nx run-many -t build -p api-docs digest
# yarn tsc -p ./tsconfig.just-scripts-configs.json

- name: check formatting
run: |
yarn nx format:check --base origin/master
# - name: 'check packages: installed dependencies versions'
# run: |
# yarn check:installed-dependencies-versions

- name: build, test, lint, test-ssr (affected)
run: |
FLUENT_JEST_WORKER=2 yarn nx affected -t build test lint type-check test-ssr test-integration verify-packaging --exclude react-19-tests-v9 --nxBail
# - name: check formatting
# run: |
# yarn nx format:check --base origin/master

- name: 'Check for unstaged changes'
run: |
git status --porcelain
git diff-index --quiet HEAD -- || exit 1

react-major-versions-integration:
if: ${{ github.repository_owner == 'microsoft' }}
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
with:
main-branch-name: 'master'

- uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: '22'

- run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)"

- run: |
yarn install --frozen-lockfile
yarn rit --react 17 --install-deps
yarn rit --react 19 --install-deps

- name: Verify Cypress installs from RIT temp workspaces (React 17 -> v13, React 19 -> v14)
run: |
"$GITHUB_WORKSPACE"/tmp/rit/react-17/node_modules/.bin/cypress verify
"$GITHUB_WORKSPACE"/tmp/rit/react-19/node_modules/.bin/cypress verify

- name: React Versions Integration Tests (17,19) - E2E
id: e2e
run: |
yarn nx affected -t test-rit--17--e2e,test-rit--19--e2e --exclude='react-19-tests-v9,react-charting,react'

- name: Upload Cypress screenshots if exist
uses: actions/upload-artifact@v4
if: always() && steps.e2e.outcome == 'failure'
with:
name: cypress-screenshots-react-test-rit
path: |
tmp/rit/**/cypress/screenshots/**/*.png
retention-days: 1

- name: React Versions Integration Tests (17,19) - Type-check & Test
- name: build, test, lint, test-ssr (affected)
run: |
FLUENT_JEST_WORKER=2 yarn nx affected -t test-rit--17--type-check,test-rit--19--type-check,test-rit--17--test,test-rit--19--test --exclude='react-19-tests-v9'

react_19_v9_source_code_typecheck:
if: ${{ github.repository_owner == 'microsoft' }}
runs-on: ubuntu-latest
permissions:
contents: 'read'
actions: 'read'
name: v9 source code type-check against React 19
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
with:
main-branch-name: 'master'

- uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: '22'

- run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)"

- run: |
yarn install --frozen-lockfile
yarn rit --react 19 --install-deps

- run: |
yarn nx affected -t test-rit--19--type-check --exclude='*,!react-19-tests-v9'

e2e:
if: ${{ github.repository_owner == 'microsoft' }}
# TODO: switch to macos once problematic tests are fixed
# https://github.com/microsoft/fluentui/issues/33173
# https://github.com/microsoft/fluentui/issues/33172
runs-on: ubuntu-latest
permissions:
contents: 'read'
actions: 'read'

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
with:
main-branch-name: 'master'

- uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: '22'

- run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)"

- run: yarn install --frozen-lockfile

- name: Install Playwright dependencies
run: yarn playwright install --with-deps

- name: Verify Cypress install
run: yarn cypress verify

- name: Cypress/Playwright E2E tests
run: yarn nx affected -t e2e --exclude react-19-tests-v9 --nxBail --parallel 1

- name: Upload Cypress screenshots if exist
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: |
apps/*/cypress/screenshots/**/*.png
packages/**/cypress/screenshots/**/*.png
retention-days: 1
FLUENT_JEST_WORKER=2 yarn nx run-many -t lint --exclude react-19-tests-v9 --nxBail

# - name: 'Check for unstaged changes'
# run: |
# git status --porcelain
# git diff-index --quiet HEAD -- || exit 1

# react-major-versions-integration:
# if: ${{ github.repository_owner == 'microsoft' }}
# runs-on: macos-14-xlarge
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Derive appropriate SHAs for base and head for `nx affected` commands
# uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
# with:
# main-branch-name: 'master'
#
# - uses: actions/setup-node@v4
# with:
# cache: 'yarn'
# node-version: '22'
#
# - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)"
#
# - run: |
# yarn install --frozen-lockfile
# yarn rit --react 17 --install-deps
# yarn rit --react 19 --install-deps
#
# - name: Verify Cypress installs from RIT temp workspaces (React 17 -> v13, React 19 -> v14)
# run: |
# "$GITHUB_WORKSPACE"/tmp/rit/react-17/node_modules/.bin/cypress verify
# "$GITHUB_WORKSPACE"/tmp/rit/react-19/node_modules/.bin/cypress verify
#
# - name: React Versions Integration Tests (17,19) - E2E
# id: e2e
# run: |
# yarn nx affected -t test-rit--17--e2e,test-rit--19--e2e --exclude='react-19-tests-v9,react-charting,react'
#
# - name: Upload Cypress screenshots if exist
# uses: actions/upload-artifact@v4
# if: always() && steps.e2e.outcome == 'failure'
# with:
# name: cypress-screenshots-react-test-rit
# path: |
# tmp/rit/**/cypress/screenshots/**/*.png
# retention-days: 1
#
# - name: React Versions Integration Tests (17,19) - Type-check & Test
# run: |
# FLUENT_JEST_WORKER=2 yarn nx affected -t test-rit--17--type-check,test-rit--19--type-check,test-rit--17--test,test-rit--19--test --exclude='react-19-tests-v9'

# react_19_v9_source_code_typecheck:
# if: ${{ github.repository_owner == 'microsoft' }}
# runs-on: ubuntu-latest
# permissions:
# contents: 'read'
# actions: 'read'
# name: v9 source code type-check against React 19
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Derive appropriate SHAs for base and head for `nx affected` commands
# uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
# with:
# main-branch-name: 'master'
#
# - uses: actions/setup-node@v4
# with:
# cache: 'yarn'
# node-version: '22'
#
# # - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)"
#
# - run: |
# yarn install --frozen-lockfile
# # yarn rit --react 19 --install-deps
#
# - run: |
# yarn nx affected -t test-rit--19--type-check --exclude='*,!react-19-tests-v9'

# e2e:
# if: ${{ github.repository_owner == 'microsoft' }}
# # TODO: switch to macos once problematic tests are fixed
# # https://github.com/microsoft/fluentui/issues/33173
# # https://github.com/microsoft/fluentui/issues/33172
# runs-on: ubuntu-latest
# permissions:
# contents: 'read'
# actions: 'read'
#
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Derive appropriate SHAs for base and head for `nx affected` commands
# uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
# with:
# main-branch-name: 'master'
#
# - uses: actions/setup-node@v4
# with:
# cache: 'yarn'
# node-version: '22'
#
# - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)"
#
# - run: yarn install --frozen-lockfile
#
# - name: Install Playwright dependencies
# run: yarn playwright install --with-deps
#
# - name: Verify Cypress install
# run: yarn cypress verify
#
# - name: Cypress/Playwright E2E tests
# run: yarn nx affected -t e2e --exclude react-19-tests-v9 --nxBail --parallel 1
#
# - name: Upload Cypress screenshots if exist
# uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: cypress-screenshots
# path: |
# apps/*/cypress/screenshots/**/*.png
# packages/**/cypress/screenshots/**/*.png
# retention-days: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate to eslint flat config",
"packageName": "@fluentui/babel-preset-global-context",
"email": "vgenaev@gmail.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate to eslint flat config",
"packageName": "@fluentui/babel-preset-storybook-full-source",
"email": "vgenaev@gmail.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate to eslint flat config",
"packageName": "@fluentui/eslint-plugin-react-components",
"email": "vgenaev@gmail.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate to eslint flat config",
"packageName": "@fluentui/global-context",
"email": "vgenaev@gmail.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate to eslint flat config",
"packageName": "@fluentui/keyboard-keys",
"email": "vgenaev@gmail.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate to eslint flat config",
"packageName": "@fluentui/priority-overflow",
"email": "vgenaev@gmail.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate to eslint flat config",
"packageName": "@fluentui/react-accordion",
"email": "vgenaev@gmail.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate to eslint flat config",
"packageName": "@fluentui/react-alert",
"email": "vgenaev@gmail.com",
"dependentChangeType": "none"
}
Loading