Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .ado/windows-vs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,90 @@ jobs:
script: del SampleApp.uwp.bundle
workingDirectory: vnext

- job: CliInit
displayName: Verify react-native init
pool:
vmImage: vs2017-win2016
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: true # whether to fetch clean each time
# fetchDepth: 2 # the depth of commits to ask Git to fetch
lfs: false # whether to download Git-LFS files
submodules: false # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
persistCredentials: false # set to 'true' to leave the OAuth token in the Git config after the initial fetch

# First do a build of the local package, since we point the cli at the local files, it needs to be pre-built
- task: CmdLine@2
displayName: yarn install (local react-native-windows)
inputs:
script: yarn install --frozen-lockfile
workingDirectory: vnext

- task: CmdLine@2
displayName: yarn build (local react-native-windows)
inputs:
script: yarn build
workingDirectory: vnext

# yarn ends up copying the whole node_modules folder when doing an install of a file package
# Delete node_modules, so that resolution is more like when installing from a published npm package
- task: CmdLine@2
displayName: Remove node_modules
inputs:
script: rd /S /Q node_modules
workingDirectory: vnext

- task: CmdLine@2
displayName: Install react-native cli
inputs:
script: npm install -g react-native-cli

- task: CmdLine@2
displayName: Init new project
inputs:
script: react-native init testcli
workingDirectory: $(Agent.BuildDirectory)

- task: CmdLine@2
displayName: Install rnpm-plugin-windows
inputs:
script: yarn add rnpm-plugin-windows@file:$(Build.SourcesDirectory)\current\local-cli\rnpm\windows
workingDirectory: $(Agent.BuildDirectory)\testcli

- task: CmdLine@2
displayName: Apply windows template
inputs:
script: react-native windows --template vnext --windowsVersion file:$(Build.SourcesDirectory)\vnext
workingDirectory: $(Agent.BuildDirectory)\testcli

- template: templates/install-SDK.yml

- task: NuGetCommand@2
displayName: NuGet restore
inputs:
command: restore
restoreSolution: $(Agent.BuildDirectory)\testcli\windows\testcli.sln

- task: MSBuild@1
displayName: MSBuild - Build the project
inputs:
solution: $(Agent.BuildDirectory)\testcli\windows\testcli.sln
msbuildVersion: '15.0' # Optional. Options: latest, 16.0, 15.0, 14.0, 12.0, 4.0
msbuildArchitecture: 'x86' # Optional. Options: x86, x64
platform: x64 # Optional
configuration: Debug # Optional
restoreNugetPackages: true
msbuildArguments: '/p:PreferredToolArchitecture=x64' # Optional
clean: true # Optional

- task: CmdLine@2
displayName: Create bundle
inputs:
script: react-native bundle --entry-file App.windows.js platform uwp --bundle-output test.bundle
workingDirectory: $(Agent.BuildDirectory)\testcli

- job: RnwNativePRBuild
displayName: Windows Visual Studio with Win32 PR
strategy:
Expand Down
Loading