forked from microsoft/react-native-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
62 lines (50 loc) · 2.61 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
version: 1.0.{build}
max_jobs: 2
image: Visual Studio 2015
cache:
- ReactWindows\packages -> ReactWindows\**\packages.config
- '%USERPROFILE%\.nuget\packages -> ReactWindows\**\project.json'
environment:
nodejs_version: "6"
install:
- ps: Install-Product node $env:nodejs_version x64
- 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, give it a moment to start
before_test:
- ps: $winium = Start-Process -PassThru C:\winium\Winium.Desktop.Driver.exe
- ps: Start-Sleep -s 5
test:
assemblies:
- ReactWindows\ReactNative.Net46.Tests\bin\x64\**\*.Tests.dll
test_script:
- npm run flow-check
- npm test
after_test:
- ps: Stop-Process -Id $winium.Id
- ReactWindows\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user -target:"ReactWindows\packages\NUnit.ConsoleRunner.3.5.0\tools\nunit3-console.exe" -targetargs:"ReactWindows\ReactNative.Net46.Tests\bin\x86\Debug\ReactNative.Net46.Tests.dll" -output:ReactWindows_coverage.xml
- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
- pip install codecov
- codecov -f "ReactWindows_coverage.xml"