microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
33ecd2a0c0005c03865d7f96c8a39da9856ade36

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.ci/smoke/smoke-tests-common-validation.yml

102lines · modecode

1steps:
2 - bash: "rm -rf $(Agent.WorkFolder)/_tools/node"
3 displayName: "Clear Node cache"
4
5 - bash: |
6 rm -rf /tmp/metro-bundler-cache-*
7 rm -rf /tmp/haste-map-react-native-packager-*
8 rm -rf ~/.cache/yarn
9 displayName: Clear RN, Yarn cache
10 condition: and(succeeded(), or(eq(variables['Agent.OS'], 'Linux'), eq(variables['Agent.OS'], 'Darwin')))
11
12 - task: NodeTool@0
13 displayName: Use Node 16.x
14 inputs:
15 versionSpec: 16.x
16 checkLatest: true
17
18 - task: Npm@1
19 displayName: "npm i gulp @vscode/vsce -g"
20 inputs:
21 command: custom
22 verbose: false
23 customCommand: "i gulp @vscode/vsce -g --force"
24
25 - task: Npm@1
26 displayName: "npm ci"
27 inputs:
28 command: custom
29 verbose: false
30 customCommand: ci
31
32 - task: Gulp@0
33 displayName: "gulp release"
34 inputs:
35 targets: release
36
37 - task: CopyFiles@2
38 displayName: "Copy Files to: test/smoke/package/resources/drop-win"
39 inputs:
40 Contents: "*.vsix"
41 TargetFolder: "test/smoke/package/resources/drop-win"
42
43 - bash: |
44 /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
45 echo ">>> Started xvfb"
46 displayName: Start xvfb
47 condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
48
49 - bash: |
50 npm install -g yarn react-native-cli
51 npm install -g appium@$(appiumVersion) --force
52 npm install -g expo-cli@$(expoCLIVersion)
53 npm install -g @expo/ngrok@^4.1.0
54 displayName: "npm install -g yarn react-native-cli expo-cli @expo/ngrok appium"
55
56 - bash: npm install --global windows-build-tools --vs2017
57 displayName: "npm install --global windows-build-tools --vs2017"
58 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
59
60 - bash: |
61 export MOCHA_FILE=./ReactNativeSmokeTests.xml
62 export BASIC_ONLY=""
63 export RESET_CACHE=""
64 export SKIP_UNSTABLE_TESTS=""
65 if [ -z "$(runAllTest)" ]; then
66 SKIP_UNSTABLE_TESTS="--skip-unstable-tests"
67 fi
68 if [ -n "$(basicOnly)" ]; then
69 BASIC_ONLY="--basic-only"
70 fi
71 if [ -n "$(resetApplicationCache)" ]; then
72 RESET_CACHE="--reset-cache"
73 fi
74 yarn smoke-tests $BASIC_ONLY $RESET_CACHE $SKIP_UNSTABLE_TESTS
75 displayName: "Run smoke tests"
76 env:
77 DISPLAY: ":99.0"
78
79 - powershell: Get-AppxPackage | where-object {$_.InstallLocation –Match "RNWApp"} | Remove-AppxPackage
80 displayName: "Clean up RNW app"
81 condition: and(always(), eq(variables['Agent.OS'], 'Windows_NT'))
82
83 - task: PublishTestResults@2
84 displayName: "Publish Test Results"
85 inputs:
86 testResultsFiles: "./$(smokeTestDirectory)/vscode/test/smoke/ReactNativeSmokeTests.xml"
87 failTaskOnFailedTests: true
88 testRunTitle: $(Agent.OS) React Native extension smoke tests - Attempt №$(System.JobAttempt)
89 condition: always()
90
91 - task: ArchiveFiles@2
92 displayName: "Archive SmokeTestLogs"
93 inputs:
94 rootFolderOrFile: SmokeTestLogs
95 archiveFile: "$(Build.ArtifactStagingDirectory)/SmokeTestLogs_$(Agent.JobName)"
96 condition: always()
97
98 - task: PublishBuildArtifacts@1
99 displayName: "Publish Artifact: SmokeTestLogs"
100 inputs:
101 ArtifactName: SmokeTestLogs
102 condition: always()
103