Skip to content

Commit 64104a7

Browse files
ci(travis): remove building mono 5.18.0 (#152)
move unit tests into their own stage for clarity and allow us to build with mono 5.2.0 only
1 parent 4739ff0 commit 64104a7

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

.travis.yml

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,10 @@
1-
language: csharp
2-
dist: xenial
3-
mono:
4-
- 5.2.0
5-
# needed to make travis run the unit tests
6-
- 5.18.0
7-
solution: "./OptimizelySDK.Travis.sln"
8-
install:
9-
- nuget restore ./OptimizelySDK.Travis.sln
10-
- nuget install ./OptimizelySDK.Tests/packages.config -OutputDirectory ./packages
11-
- nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory ./testrunner
12-
script:
13-
- xbuild /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$TRAVIS_BUILD_DIR/keypair.snk /p:Configuration=Release ./OptimizelySDK.Travis.sln
14-
- mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./OptimizelySDK.Tests/bin/Release/OptimizelySDK.Tests.dll
15-
# strongname signing from xbuild step needs additional re-signing with sn
16-
- find . -path './OptimizelySDK*bin/Release/OptimizelySDK*.dll' -not -regex '.*Tests.*' -print0 | while IFS= read -r -d '' file; do sn -R $file ./keypair.snk; done
17-
after_success:
18-
- pip install --user awscli
19-
# upload dll build artifacts to s3 with -unsigned suffix
20-
- ([ ${TRAVIS_BRANCH} = "master" ] && [ ${TRAVIS_EVENT_TYPE} = "push" ]) && find . -path './OptimizelySDK*bin/Release/OptimizelySDK*.dll' -not -regex '.*Tests.*' -print0 | while IFS= read -r -d '' file; do (AWS_ACCESS_KEY_ID=$OFTA_KEY AWS_SECRET_ACCESS_KEY=$OFTA_SECRET AWS_DEFAULT_REGION=$OFTA_REGION aws s3 cp $file s3://optly-fs-travisci-artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/$(basename $file)-unsigned); done
1+
language: minimal
212

223
# Integration tests need to run first to reset the PR build status to pending
234
stages:
24-
- 'Integration tests'
25-
- 'Test'
5+
- name: 'Integration tests'
6+
- name: 'Unit Tests'
7+
- name: 'NetStandard16'
268

279
jobs:
2810
include:
@@ -37,6 +19,26 @@ jobs:
3719
script:
3820
- "$HOME/travisci-tools/fsc-trigger/trigger_fullstack-sdk-compat.sh"
3921
after_success: travis_terminate 0
22+
23+
- stage: 'Unit Tests'
24+
language: csharp
25+
dist: xenial
26+
mono: 5.2.0
27+
solution: "./OptimizelySDK.Travis.sln"
28+
install:
29+
- nuget restore ./OptimizelySDK.Travis.sln
30+
- nuget install ./OptimizelySDK.Tests/packages.config -OutputDirectory ./packages
31+
- nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory ./testrunner
32+
script:
33+
- xbuild /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$TRAVIS_BUILD_DIR/keypair.snk /p:Configuration=Release ./OptimizelySDK.Travis.sln
34+
- mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./OptimizelySDK.Tests/bin/Release/OptimizelySDK.Tests.dll
35+
# strongname signing from xbuild step needs additional re-signing with sn
36+
- find . -path './OptimizelySDK*bin/Release/OptimizelySDK*.dll' -not -regex '.*Tests.*' -print0 | while IFS= read -r -d '' file; do sn -R $file ./keypair.snk; done
37+
after_success:
38+
- pip install --user awscli
39+
# upload dll build artifacts to s3 with -unsigned suffix
40+
- ([ ${TRAVIS_BRANCH} = "master" ] && [ ${TRAVIS_EVENT_TYPE} = "push" ]) && find . -path './OptimizelySDK*bin/Release/OptimizelySDK*.dll' -not -regex '.*Tests.*' -print0 | while IFS= read -r -d '' file; do (AWS_ACCESS_KEY_ID=$OFTA_KEY AWS_SECRET_ACCESS_KEY=$OFTA_SECRET AWS_DEFAULT_REGION=$OFTA_REGION aws s3 cp $file s3://optly-fs-travisci-artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/$(basename $file)-unsigned); done
41+
4042
- stage: 'NetStandard16'
4143
language: csharp
4244
# dotnet only works on trusty https://github.com/travis-ci/travis-ci/issues/5189

0 commit comments

Comments
 (0)