-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Scenario Test pipeline for react video sample (#419)
Co-authored-by: Chengcheng Hu <[email protected]>
- Loading branch information
1 parent
046a85e
commit 94fc825
Showing
5 changed files
with
106 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# https://domoreexp.visualstudio.com/Teamspace/_build?definitionId=6457 | ||
|
||
resources: | ||
repositories: | ||
- repository: SkypeSpaces-Infra | ||
type: git | ||
name: SkypeSpaces-Infra | ||
- repository: MsTeamsServices-Tools | ||
type: git | ||
name: MsTeamsServices-Tools | ||
|
||
variables: | ||
- template: variables/variables.yml | ||
- name: esLintExclusionFilePath | ||
value: "$(Build.SourcesDirectory)/.eslintignore" | ||
- name: esLintTargets | ||
value: '' | ||
|
||
trigger: | ||
- scenario_test | ||
|
||
extends: | ||
template: azure-devops-templates/steps/coral/general_build_template.yml@SkypeSpaces-Infra | ||
parameters: | ||
name: 'build' | ||
pool: | ||
name: 1ES-Teams-MMSWindows2019 | ||
jobParams: | ||
displayName: 'CI SDK Build' | ||
condition: succeeded() | ||
timeoutInMinutes: 30 | ||
cancelTimeoutInMinutes: 5 | ||
service_tree: | ||
service_id: ${{ variables.ServiceTreeID }} | ||
isProduction: false | ||
sdl: | ||
esLint: | ||
esLintExclusionFilePath: ${{ variables.esLintExclusionFilePath }} | ||
|
||
stages: | ||
- stage: BuildLiveShareSDK | ||
jobs: | ||
- job: Phase1 | ||
displayName: Build Live Share SDK | ||
pool: | ||
name: 1ES-Teams-MMSWindows2019 | ||
condition: succeeded() | ||
variables: | ||
Build.SDL.Roslyn.Enabled: false | ||
timeoutInMinutes: 10 | ||
cancelTimeoutInMinutes: 1 | ||
|
||
steps: | ||
- script: "npm install --no-audit --legacy-peer-deps" | ||
workingDirectory: "" | ||
displayName: "npm install" | ||
|
||
- script: "npm run build" | ||
workingDirectory: "" | ||
displayName: "npm run build" | ||
|
||
- script: "npm install --no-audit --legacy-peer-deps" | ||
workingDirectory: "${{ variables.sdk_samples_directory }}/javascript/02.react-video" | ||
displayName: "npm install sample" | ||
|
||
- script: "npm install jest" | ||
workingDirectory: "${{ variables.sdk_samples_directory }}/javascript/02.react-video" | ||
displayName: "npm install jest" | ||
|
||
- script: "npm run build" | ||
workingDirectory: "${{ variables.sdk_samples_directory }}/javascript/02.react-video" | ||
displayName: "npm run build sample" | ||
|
||
- task: Bash@3 | ||
inputs: | ||
targetType: "inline" | ||
workingDirectory: "${{ variables.sdk_samples_directory }}/javascript/02.react-video" | ||
script: | | ||
sh ../../../.azure-devops/scenario_test.sh | ||
displayName: "run test" |
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,21 @@ | ||
#!/bin/bash | ||
RET="" | ||
npm run start & | ||
success=0 | ||
tries=5 | ||
pause=30 | ||
while [ $success = 0 -a $tries -gt 0 ]; do | ||
sleep $pause | ||
let tries=tries-1 | ||
yarn test 1>logs 2>results & | ||
RET=$(cat results | grep "Tests:" | tail -f -n 1) | ||
if [[ "$RET" != *"failed"* ]]; then | ||
success=1 | ||
fi | ||
done | ||
if [ $success = 0 ]; then | ||
echo $(RET) >&2 | ||
exit 1 | ||
else | ||
echo "sucess" >&2 | ||
fi |
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