Update appium and node version (#2745)

* Update appium and node version (#2620)

* Update appium beta version to version that doesn't use jsdoc

* Update tester_deps yarn.lock

* Change files

* Update a bunch of things in an attempt to get things working again...

* Update node?

* diagnose what's up with CI

* Introduce .node-version file

* remove midgard-yarn

* Frozel lockfile

* undo yarn please change

* Appium driver install added back

* Appium driver install added back

* Appium driver install added back

* Remove flakiness

---------

Co-authored-by: Saad Najmi <saadnajmi2@gmail.com>

* Add test steps to JS PR

* fix dry-run script

* temporarily remove buildci step

* try node 14.x

* build button package first

* add build step back

* back to node 16

* change npm install version to 9.5.0

* just scope build to button

* Add empty .npmignore file

* remove extra npm install and dry-run steps

* revert azure-pipelines script changes

---------

Co-authored-by: Ruriko Araki <ruaraki@microsoft.com>
Co-authored-by: Saad Najmi <saadnajmi2@gmail.com>
This commit is contained in:
Krystal Kramer 2023-04-06 18:50:11 -04:00 коммит произвёл GitHub
Родитель 00118f44d4
Коммит e840c82b62
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
21 изменённых файлов: 1580 добавлений и 2574 удалений

Просмотреть файл

@ -33,17 +33,17 @@ jobs:
displayName: NPM Publish
pool: Azure-Pipelines-EO-Ubuntu20.04-Office
steps:
- task: NodeTool@0
inputs:
versionSpec: '14.x'
displayName: 'Install Node.js'
- template: templates/setup-repo.yml
- script: |
git config user.name "UI-Fabric-RN-Bot"
git config user.email "uifrnbot@microsoft.com"
git remote set-url origin https://$(githubUser):$(githubPAT)@github.com/microsoft/ui-fabric-react-native.git
displayName: Git Authentication
- template: templates/yarn-install.yml
- script: |
yarn
displayName: 'yarn install'
- script: |
yarn buildci

Просмотреть файл

@ -8,15 +8,7 @@ steps:
- checkout: self
persistCredentials: true
- task: NodeTool@0
inputs:
versionSpec: "14.x"
displayName: "Install Node.js"
- task: NuGetToolInstaller@0
inputs:
versionSpec: "5.6.0"
displayName: "Install Nuget"
- template: setup-repo.yml
- script: |
yarn

Просмотреть файл

@ -27,6 +27,12 @@ steps:
condition: succeeded()
displayName: 'Create success build variable'
- script: |
yarn appium driver install uiautomator2
workingDirectory: apps/E2E
displayName: 'Install appium driver'
condition: succeeded()
- script: |
yarn e2etest:android
workingDirectory: apps/E2E
@ -39,3 +45,9 @@ steps:
platform: 'android'
buildArtifacts: variables['task.Build.status']
directory: $(Build.SourcesDirectory)/apps/E2E
- script: |
yarn appium driver uninstall uiautomator2
workingDirectory: apps/E2E
displayName: 'Uninstall appium driver'
condition: succeeded()

Просмотреть файл

@ -11,6 +11,12 @@ steps:
condition: succeeded()
displayName: 'Create success build variable'
- script: |
yarn appium driver install xcuitest
workingDirectory: apps/E2E
displayName: 'Install appium driver'
condition: succeeded()
- script: |
yarn e2etest:ios
workingDirectory: apps/E2E
@ -23,3 +29,9 @@ steps:
platform: 'ios'
buildArtifacts: variables['task.Build.status']
directory: $(Build.SourcesDirectory)/apps/E2E
- script: |
yarn appium driver uninstall xcuitest
workingDirectory: apps/E2E
displayName: 'Uninstall appium driver'
condition: succeeded()

Просмотреть файл

@ -11,6 +11,12 @@ steps:
condition: succeeded()
displayName: 'Create success build variable'
- script: |
yarn appium driver install mac2
workingDirectory: apps/E2E
displayName: 'Install appium driver'
condition: succeeded()
- script: |
yarn e2etest:macos
workingDirectory: apps/E2E
@ -22,4 +28,10 @@ steps:
applicationType: macos
platform: 'macos'
buildArtifacts: variables['task.Build.status']
directory: $(Build.SourcesDirectory)/apps/E2E
directory: $(Build.SourcesDirectory)/apps/E2E
- script: |
yarn appium driver uninstall mac2
workingDirectory: apps/E2E
displayName: 'Uninstall appium driver'
condition: succeeded()

Просмотреть файл

@ -57,6 +57,12 @@ steps:
condition: succeeded()
displayName: 'Create success build variable'
- script: |
yarn appium driver install --source=npm appium-windows-driver
workingDirectory: apps/E2E
displayName: 'Install appium driver'
condition: succeeded()
- script: |
yarn e2etest:windows
workingDirectory: apps\E2E

Просмотреть файл

@ -25,6 +25,12 @@ steps:
condition: succeeded()
displayName: 'Create success build variable'
- script: |
yarn appium driver install --source=npm appium-windows-driver
workingDirectory: apps/win32
displayName: 'Install appium driver'
condition: succeeded()
- script: |
yarn e2etest
workingDirectory: apps/win32
@ -37,3 +43,9 @@ steps:
platform: 'win32'
buildArtifacts: variables['task.Build.status']
directory: $(Build.SourcesDirectory)/apps/win32
- script: |
yarn appium driver uninstall windows
workingDirectory: apps/win32
displayName: 'Uninstall appium driver'
condition: succeeded()

Просмотреть файл

@ -2,12 +2,14 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
displayName: "Install Node.js"
versionSource: 'fromFile'
versionFilePath: '.node-version'
- task: NuGetToolInstaller@0
inputs:
versionSpec: "5.6.0"
displayName: "Install Nuget"
versionSpec: '5.6.0'
displayName: 'Install Nuget'
- template: yarn-install.yml
- script: |
yarn install --frozen-lockfile
displayName: 'yarn install'

Просмотреть файл

@ -1,6 +0,0 @@
steps:
- task: CmdLine@2
displayName: midgard-yarn (faster yarn install)
inputs:
script: npx midgard-yarn@1.23.33 --network-concurrency 40 --frozen-lockfile --cache-folder \.yarnCache

1
.node-version Normal file
Просмотреть файл

@ -0,0 +1 @@
16

0
.npmignore Normal file
Просмотреть файл

Просмотреть файл

@ -31,24 +31,24 @@
"@fluentui-react-native/focus-zone": "^0.11.40",
"@fluentui-react-native/scripts": "^0.1.1",
"@rnx-kit/metro-config": "^1.3.1",
"@types/jasmine": "3.5.10",
"@types/jasmine": "3.10.3",
"@types/react": "^17.0.2",
"@types/react-native": "^0.68.0",
"@wdio/appium-service": "7.23.0",
"@wdio/cli": "7.23.0",
"@wdio/jasmine-framework": "7.23.0",
"@wdio/local-runner": "7.23.0",
"@wdio/spec-reporter": "7.23.0",
"appium": "2.0.0-beta.41",
"appium-mac2-driver": "1.4.0",
"appium-uiautomator2-driver": "^2.10.2",
"appium-windows-driver": "2.0.7",
"appium-xcuitest-driver": "4.11.1",
"@wdio/appium-service": "7.30.0",
"@wdio/cli": "7.30.1",
"@wdio/jasmine-framework": "7.26.0",
"@wdio/local-runner": "7.30.1",
"@wdio/spec-reporter": "7.29.1",
"appium": "2.0.0-beta.55",
"appium-mac2-driver": "1.5.1",
"appium-uiautomator2-driver": "^2.12.3",
"appium-windows-driver": "2.3.5",
"appium-xcuitest-driver": "4.16.12",
"metro-config": "^0.67.0",
"metro-react-native-babel-preset": "^0.67.0",
"ts-node": "^8.10.1",
"typescript": "4.9.4",
"webdriverio": "7.23.0"
"webdriverio": "7.30.1"
},
"rnx-kit": {
"kitType": "app",

Просмотреть файл

@ -44,25 +44,25 @@
"@office-iss/rex-win32": "0.68.26-devmain.16227.10000",
"@rnx-kit/cli": "^0.16.2",
"@rnx-kit/metro-config": "^1.3.1",
"@types/jasmine": "3.5.10",
"@types/jasmine": "3.10.3",
"@types/react": "^17.0.2",
"@types/react-native": "^0.68.0",
"@wdio/allure-reporter": "7.23.0",
"@wdio/appium-service": "7.23.0",
"@wdio/cli": "7.23.0",
"@wdio/jasmine-framework": "7.23.0",
"@wdio/local-runner": "7.23.0",
"@wdio/spec-reporter": "7.23.0",
"@wdio/allure-reporter": "7.30.1",
"@wdio/appium-service": "7.30.0",
"@wdio/cli": "7.30.1",
"@wdio/jasmine-framework": "7.26.0",
"@wdio/local-runner": "7.30.1",
"@wdio/spec-reporter": "7.29.1",
"allure-commandline": "2.13.0",
"appium": "2.0.0-beta.41",
"appium-windows-driver": "2.0.7",
"appium": "2.0.0-beta.55",
"appium-windows-driver": "2.3.5",
"metro-config": "^0.67.0",
"metro-react-native-babel-preset": "^0.67.0",
"react-native-svg-transformer": "^1.0.0",
"react-test-renderer": "17.0.2",
"ts-node": "^8.10.1",
"typescript": "4.9.4",
"webdriverio": "7.23.0"
"webdriverio": "7.30.1"
},
"jest": {
"preset": "react-native"

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Update appium beta version to version that doesn't use jsdoc",
"packageName": "@fluentui-react-native/e2e-testing",
"email": "ruaraki@microsoft.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Update appium beta version to version that doesn't use jsdoc",
"packageName": "@fluentui-react-native/tester-win32",
"email": "ruaraki@microsoft.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -70,13 +70,13 @@
]
},
"resolutions": {
"@appium/support": "^2.57.0",
"@appium/support": "3.1.5",
"es5-ext": "0.10.53",
"jpeg-js": "^0.4.4",
"moment": "^2.29.4",
"shell-quote": "^1.7.3",
"@types/react": "^17.0.2",
"@appium/types": "0.5.0",
"@appium/types": "0.9.1",
"micromatch": "^4.0.0"
},
"rnx-kit": {

Просмотреть файл

@ -1,191 +0,0 @@
trigger:
branches:
include:
- tsc-compat-debug
- refs/tags/office-ui-fabric-react_v*
variables:
- name: PackageName
value: office-ui-fabric-react
- name: CompatRepoUrl
value: https://github.com/Microsoft/ui-fabric-ts-validation.git
- name: NodeVersion
value: '10.x'
- name: UbuntuPool
value: 'cxe-ubuntu-20-04-small'
jobs:
- job: Build
pool: $(UbuntuPool)
timeoutInMinutes: 60
steps:
- checkout: self
clean: true
- task: NodeTool@0
displayName: 'Use Node $(NodeVersion)'
inputs:
versionSpec: '$(NodeVersion)'
checkLatest: true
# Install Rush repo dependencies
- script: |
node common/scripts/install-run-rush.js install --bypass-policy
displayName: Run Rush install in office-ui-fabric-react repository
# Build package in Rush repo
- script: |
node common/scripts/install-run-rush.js build --to $(PackageName)
displayName: Run Rush build --to $(PackageName)
# Run npm pack to simulate installation from feed
- script: |
npm pack ./packages/$(PackageName)
displayName: Run npm pack $(PackageName)
# Save ReleaseId into a txt artifact file
- script: |
echo *.tgz | grep -oP '(?<=office-ui-fabric-react-).*(?=.tgz)' >> $(Build.StagingDirectory)/compatMap.txt
name: setReleaseIdStep
displayName: Save ReleaseId into a txt artifact file
# Rename built package tarball to reference later
- script: |
mv *.tgz $(Build.StagingDirectory)/$(PackageName).tgz
displayName: Move $(PackageName).tgz to Build.StagingDirectory
# Publish built library for validation job
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts
inputs:
pathtoPublish: $(Build.StagingDirectory)
artifactName: compatMapDrop
- job: Compatibility
dependsOn: Build
condition: succeeded()
timeoutInMinutes: 60
pool: $(UbuntuPool)
strategy:
maxParallel: 1
matrix:
'TypeScript 2.4':
TypeScriptVersion: 2.4
'TypeScript 2.7':
TypeScriptVersion: 2.7
'TypeScript 2.8':
TypeScriptVersion: 2.8
'TypeScript 2.9':
TypeScriptVersion: 2.9
'TypeScript 3.0':
TypeScriptVersion: 3.0
'TypeScript 3.1':
TypeScriptVersion: 3.1
'TypeScript 3.2':
TypeScriptVersion: 3.2
'TypeScript 3.3':
TypeScriptVersion: 3.3
'TypeScript 3.4':
TypeScriptVersion: 3.4
steps:
- checkout: none
- task: NodeTool@0
displayName: 'Use Node $(NodeVersion)'
inputs:
versionSpec: '$(NodeVersion)'
checkLatest: true
# Download build library
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts'
inputs:
artifactName: compatMapDrop
downloadPath: $(Build.StagingDirectory)
# Clone repository containing versioned TypeScript sample apps
- script: |
git clone $(CompatRepoUrl) $(Build.StagingDirectory)/__tests__
displayName: Clone compatibility repository
# Install repository's dependencies
- script: |
node common/scripts/install-run-rush.js install
displayName: Run Rush install in compatibility repository
workingDirectory: $(Build.StagingDirectory)/__tests__
# Install built package tarball in sample app
- script: |
npm install $(Build.StagingDirectory)/compatMapDrop/$(PackageName).tgz
displayName: Install $(PackageName) in TypeScript $(TypeScriptVersion) test app
workingDirectory: $(Build.StagingDirectory)/__tests__/tests/$(TypeScriptVersion)
# Build sample app consuming Office UI Fabric React to test TypeScript version compatibility
- script: |
node common/scripts/install-run-rush.js test --to $(TypeScriptVersion)-office-ui-fabric-react-test
displayName: Build TypeScript $(TypeScriptVersion) test app
workingDirectory: $(Build.StagingDirectory)/__tests__
# Write successful ts versions to compatMap.txt
- script: |
echo $(TypeScriptVersion) >> $(Build.StagingDirectory)/compatMapDrop/compatMap.txt
displayName: Write successful ts versions to compatMap.txt
# Publish built library for validation job
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts
inputs:
pathtoPublish: $(Build.StagingDirectory)/compatMapDrop
artifactName: compatMapDrop
- job: InvokePOSTAPI
dependsOn: Compatibility
condition: always()
timeoutInMinutes: 60
pool: $(UbuntuPool)
steps:
# Download build library
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts'
inputs:
artifactName: compatMapDrop
downloadPath: $(Build.StagingDirectory)
# Invoke POST API with json body
# The artifact file compatMap.txt which has the TS compatibility folows the below format,
# where the first line is the OUFR release and the subsequent lines are the TS versions supported
# 6.182.1
# 2.8
# 2.9
# 3.0
# 3.1
# 3.2
# 3.3
# 3.4
# It is then concatenated into a format like 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4
# and the fabricweb backend API is invoked which writes these entrie to an Azure table
- powershell: $i = 0;
$releaseVersion = "";
$compatibleTsVersions = "";
$compatMapArray = Get-Content $env:BUILD_STAGINGDIRECTORY/compatMapDrop/compatMap.txt;
foreach($line in $compatMapArray) {
if($i -match 0) {
$releaseVersion = $line;
} else {
if($i -match 1) {
$compatibleTsVersions += $line;
} else {
$compatibleTsVersions += ", ";
$compatibleTsVersions += $line;
}
}
$i++;
}
Write-Host $releaseVersion;
Write-Host $compatibleTsVersions;
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]";
$headers.Add("AuthToken", "$(releaseVersionVariable)");
$APIUrl = "https://fabricweb.azurewebsites.net/oufr/registerNewWithTsCompat?version=$releaseVersion&compatibleTsVersions=$compatibleTsVersions";
$response = Invoke-RestMethod -Uri $APIUrl -Method Get -Headers $headers;
Write-Host $response;
displayName: Invoke POST API with json body

Просмотреть файл

@ -24,7 +24,7 @@ Or start a development inner loop against the UI Fabric demo:
To learn more about all the commands that this monorepo supports, see the wiki:
https://github.com/OfficeDev/office-ui-fabric-react/wiki/Build-Commands
`
`,
};
if (path.basename(npmPath) !== 'yarn.js') {
@ -54,7 +54,7 @@ function checkRepositoryLocation() {
if (nodePath.root !== repositoryPath.root) {
console.warn(
'\x1b[33m%s\x1b[0m',
'Your repository is located on a different drive than node.exe. This may cause build failure when running Jest tests.'
'Your repository is located on a different drive than node.exe. This may cause build failure when running Jest tests.',
);
}
}

Просмотреть файл

@ -13,23 +13,23 @@
"directory": "tester_deps"
},
"devDependencies": {
"@types/jasmine": "3.5.10",
"@types/jasmine": "3.10.3",
"@types/react": "^17.0.2",
"@types/react-native": "^0.68.0",
"@wdio/appium-service": "7.23.0",
"@wdio/cli": "7.23.0",
"@wdio/jasmine-framework": "7.23.0",
"@wdio/local-runner": "7.23.0",
"@wdio/spec-reporter": "7.23.0",
"appium": "2.0.0-beta.41",
"appium-windows-driver": "2.0.7",
"@wdio/appium-service": "7.30.0",
"@wdio/cli": "7.30.1",
"@wdio/jasmine-framework": "7.26.0",
"@wdio/local-runner": "7.30.1",
"@wdio/spec-reporter": "7.29.1",
"appium": "2.0.0-beta.55",
"appium-windows-driver": "2.3.5",
"ts-node": "^10.7.0",
"typescript": "^4.9.4",
"webdriverio": "7.23.0",
"webdriverio": "7.30.1",
"wdio-json-reporter": "3.0.0"
},
"resolutions": {
"@appium/types": "0.5.0",
"@appium/types": "0.9.1",
"wdio-json-reporter/jest-matchers/jest-message-util/micromatch/parse-glob/glob-base/glob-parent": "5.1.2",
"wdio-json-reporter/jest-matchers/jest-message-util/micromatch/braces": "^3.0.2"
},

Разница между файлами не показана из-за своего большого размера Загрузить разницу

1702
yarn.lock

Разница между файлами не показана из-за своего большого размера Загрузить разницу