53 строки
2.0 KiB
YAML
53 строки
2.0 KiB
YAML
version: 1.0.{build}
|
|
max_jobs: 2
|
|
image: Visual Studio 2015
|
|
cache:
|
|
- ReactWindows\packages -> ReactWindows\**\packages.config
|
|
- '%USERPROFILE%\.nuget\packages -> ReactWindows\**\project.json'
|
|
|
|
install:
|
|
- npm install -g npm@latest
|
|
- npm i
|
|
- ps: curl -o C:\winium.zip https://github.com/2gis/Winium.Desktop/releases/download/v1.6.0/Winium.Desktop.Driver.zip
|
|
- ps: mkdir C:\winium
|
|
- ps: Add-Type -A 'System.IO.Compression.FileSystem'
|
|
- ps: '[IO.Compression.ZipFile]::ExtractToDirectory("C:\winium.zip", "C:\winium")'
|
|
|
|
clone_script:
|
|
- ps: git clone -q $("--branch=" + $Env:APPVEYOR_REPO_BRANCH) $("https://github.com/" + $Env:APPVEYOR_REPO_NAME + ".git") $Env:APPVEYOR_BUILD_FOLDER
|
|
- ps: if (!$Env:APPVEYOR_PULL_REQUEST_NUMBER) {$("git checkout -qf " + $Env:APPVEYOR_REPO_COMMIT)}
|
|
- ps: if ($Env:APPVEYOR_PULL_REQUEST_NUMBER) {git fetch -q origin +refs/pull/$($Env:APPVEYOR_PULL_REQUEST_NUMBER)/merge; git checkout -qf FETCH_HEAD}
|
|
- ps: git submodule update -q --init --recursive
|
|
|
|
before_build:
|
|
- ps: $env:playgroundNet46_dir=$Env:APPVEYOR_BUILD_FOLDER + "\ReactWindows\Playground.Net46"
|
|
- ps: $env:bundle_dir=$Env:APPVEYOR_BUILD_FOLDER + "\ReactWindows\Playground.Net46\ReactAssets"
|
|
- ps: nuget restore ReactWindows\ReactNative.sln
|
|
- npm i -g react-native-cli
|
|
|
|
build_script:
|
|
- ps: mkdir $env:bundle_dir
|
|
- ps: react-native bundle --platform windows --entry-file $($env:playgroundNet46_dir + "\index.windows.js") --bundle-output $($env:bundle_dir + "\index.windows.bundle") --assets-dest $env:bundle_dir --dev false; echo "Suppressing error"
|
|
- cmd: >-
|
|
set DEVENV="%VS140COMNTOOLS%\..\IDE\devenv"
|
|
|
|
%DEVENV% /build "Debug|x86" ReactWindows\ReactNative.sln
|
|
|
|
%DEVENV% /build "ReleaseBundle|x64" ReactWindows\ReactNative.sln
|
|
|
|
%DEVENV% /build "Debug|ARM" ReactWindows\ReactNative.sln
|
|
|
|
# Start Winium in the background
|
|
before_test:
|
|
- ps: $winium = Start-Process -PassThru C:\winium\Winium.Desktop.Driver.exe
|
|
|
|
test:
|
|
assemblies:
|
|
- ReactWindows\ReactNative.Net46.Tests\bin\x64\**\*.Tests.dll
|
|
|
|
test_script:
|
|
- npm test
|
|
|
|
after_test:
|
|
- ps: Stop-Process -Id $winium.Id
|