forked from BenitoJedai/Bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
58 lines (55 loc) · 6.42 KB
/
.travis.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
before_install:
# The saucelabs test is broken, we can't do client tests anymore.
- export SKIP_CLIENT_TESTS=true;
# Gets commit message
- "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\""
- echo "$TRAVIS_COMMIT_MSG"
# Check if commit message contains label [skip travis] and exit if any
# [skip ci] label is standard for AppVeyor so there should be another one that deos not exists https://github.com/travis-ci/travis-ci/issues/5032
- if [[ "${TRAVIS_COMMIT_MSG,,}" == *"[skip travis]"* ]]; then echo "SETUP Commit message contains [skip travis], skipping the build" && exit; else echo "SETUP No skipping commit message labels found [skip travis], countinue building"; fi
# Check if commit message contains labels [skip travis client] or [skip ci client] to skip client tests
- if [ -z ${SKIP_CLIENT_TESTS+x} ]; then echo "SETUP SKIP_CLIENT_TESTS is unset"; else echo "SETUP SKIP_CLIENT_TESTS is set to '$SKIP_CLIENT_TESTS'"; fi
- if [[ -z ${SKIP_CLIENT_TESTS+x} && "${TRAVIS_COMMIT_MSG,,}" == *"[skip travis client]"* ]]; then echo "SETUP Commit message contains [skip travis client]"; export SKIP_CLIENT_TESTS=true; fi
- if [[ -z ${SKIP_CLIENT_TESTS+x} && "${TRAVIS_COMMIT_MSG,,}" == *"[skip ci client]"* ]]; then echo "SETUP Commit message contains [skip ci client]"; export SKIP_CLIENT_TESTS=true; fi
- if [ ! "$SKIP_CLIENT_TESTS" == "true" ]; then echo "SETUP Will run client tests"; else echo "SETUP Will not run client tests as either the skipping labels found ([skip travis client], [skip ci client]) or set SKIP_CLIENT_TESTS=true"; fi
# Check if commit message contains labels [skip travis server] or [skip ci server] to skip server tests
- if [ -z ${SKIP_SERVER_TESTS+x} ]; then echo "SETUP SKIP_SERVER_TESTS is unset"; else echo "SETUP SKIP_SERVER_TESTS is set to '$SKIP_SERVER_TESTS'"; fi
- if [[ -z ${SKIP_SERVER_TESTS+x} && "${TRAVIS_COMMIT_MSG,,}" == *"[skip travis server]"* ]]; then echo "SETUP Commit message contains [skip travis server]"; export SKIP_SERVER_TESTS=true; fi
- if [[ -z ${SKIP_SERVER_TESTS+x} && "${TRAVIS_COMMIT_MSG,,}" == *"[skip ci server]"* ]]; then echo "SETUP Commit message contains [skip ci server]"; export SKIP_SERVER_TESTS=true; fi
- if [ ! "$SKIP_SERVER_TESTS" == "true" ]; then echo "SETUP Will run server tests"; else echo "SETUP Will not run server tests as either the skipping labels found ([skip travis server], [skip ci server]) or set SKIP_SERVER_TESTS=true"; fi
- echo "Mono build currently does not work for us https://github.com/travis-ci/travis-ci/issues/7374";
- echo "Set the environment to skip xbuild and server tests";
- export SKIP_SERVER_TESTS=true;
- export SKIP_XBUILD=true;
# Below is a fix to for `package requires NuGet client version '3.0' or above, but the current NuGet version is '2.12.0.0'.`
# according to https://github.com/travis-ci/travis-ci/issues/5932
# We skip downloading and restoring latest nuget.exe as we have it in our solution
# - mkdir -p .nuget
# - wget -O .nuget/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
# - cd $TRAVIS_BUILD_DIR
# The line below starts failing in travis-build version: 5ddd724fb Issue logged - https://github.com/travis-ci/travis-ci/issues/6854
# - mono .nuget/nuget.exe
install:
# Mono build currently does not work for us https://github.com/travis-ci/travis-ci/issues/7374
# - mono .nuget/nuget.exe restore Bridge.sln -Verbosity detailed
env:
global:
- secure: h8UC6JsnMa9bwGP7/efFsJUVwmz8OqUZy37LIL/J5rkjHtzzEexRDi4gSEOkp3EgqNOupDd7PpWBJGkDhr/5sSB+3NkEh/4DeHNdHWYWEZzpmTZQuRggk8RSNohw8TIXOLh4wqm0PIEIKzBjYYInJvU9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kv/l46qLqV4InVjrUDE7+AlmhJCGvgvPp1J1Fh8i0zoXJH4O/QLI6Bk3nZbyeWlTy33fvsdFAP9xqUBt3svM5/JnDkvOMF11Mr0qOpcreb0UoiSO/JQAnaDdENTBV9M+gmADGPEIEeB63Z0/l2mgM=
language: node_js
node_js:
- "4"
solution: Bridge.sln
before_script:
- if [ ! "$SKIP_CLIENT_TESTS" == "true" ]; then cd $TRAVIS_BUILD_DIR/.build/ci; npm install; fi
# - if [ ! "$SKIP_CLIENT_TESTS" == "true" ]; then npm install -g grunt-cli; fi
script:
- if [[ ! "$SKIP_XBUILD" == "true" ]]; then cd $TRAVIS_BUILD_DIR; xbuild /p:Configuration=Release Bridge.sln; else echo "Skipping XBuild as SKIP_XBUILD"; fi
- if [[ ! "$SKIP_SERVER_TESTS" == "true" && $TRAVIS_TEST_RESULT = 0 ]]; then cd $TRAVIS_BUILD_DIR; mono ./packages/NUnit.ConsoleRunner.*/tools/nunit*-console.exe ./Compiler/TranslatorTests/bin/Release/Bridge.Translator.Tests.dll; else echo "Skipping NUnit tests as SKIP_SERVER_TESTS or build failed"; fi
- if [[ ! "$SKIP_CLIENT_TESTS" == "true" && ($TRAVIS_TEST_RESULT = 0 || "$SKIP_XBUILD" == "true")]]; then cd $TRAVIS_BUILD_DIR/.build/ci; cp -rf $TRAVIS_BUILD_DIR/Tests/Runner/* $TRAVIS_BUILD_DIR/.build/ci; npm test; else echo "Skipping sauce tests as SKIP_CLIENT_TESTS or build failed"; fi
cache:
directories:
- packages
notifications:
slack:
secure: Gs/hlDNJYnOk35VqX/VNOKxvj8IyDG2R45rnqLaOb1DMa5DHRa7zkzi4fPCFenPYUFWWKPBfH9OmF75AESoqn9lCMIG2u7r2wTh25G2kBryDpXVd4r+XzWuAQYvJ48HHX7S2+yRVO96ZoPCf0ObFxG8Wq9nF80Hl+CiveKkAXcSznOrDqkCFAXXuq3919PTaxqWdvVSWTKhlD7i8PclBjKciow/O9ie6pwW+PzgNnrhQuHBqWJwauyAEhHZt/AyT1jrBweX9+IGjncE4S25qSQryLBbbCVdNQOZLdYFzn53OgtdSHsFfFYeZceH5epoGYJiMDxXUg+CrbmO5DUQa7HRAYwAMU7XmH1Xu8M+SUi1PctLgqXm0P7qZ5e+xYMQYZipX7xYykyWBPnpMahG9mA09UJ1ezVQHCAzV585qdZ/HZJxGK+3DUzIDpuXJiHpML7fkfx4GZzqTiYLctZEx8oZOsOErOFVJI08nlm3IFg3KTagrPUw5hFHJRWVF3IwhnZ/N28zEMufD+/cTCK6tXcu08KZgY3qGivgi4lHHkXEbkt/ubaH9Kf6GlNjvCDmMELpAm2pDf+3gJTF8MPWmNy6QfkZ2xK9qQWJjui+c8FZOypgEOCUw9ErzFCVxGjHgNwuXn5dcH8JJLYGUoVEf9XM/glyd2M5oxGjl+ITHEcQ=