Skip to content

Commit 4668ff5

Browse files
mfahadahmedjuancarlostong
authored andcommitted
ci: Use travisci-tools script to trigger-fullstack-compat suite. (#147)
* ci: Use travisci-tools script to trigger-fullstack-compat suite. * 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 17a0271 commit 4668ff5

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

.travis.yml

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
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:
2911
- stage: 'Integration tests'
3012
env: SDK=csharp
3113
cache: false
32-
language: python
14+
language: minimal
3315
before_install: skip
34-
install:
35-
- "pip install awscli"
16+
install: skip
3617
before_script:
37-
- "aws s3 cp s3://optimizely-travisci-artifacts/ci/trigger_fullstack-sdk-compat.sh ci/ && chmod u+x ci/trigger_fullstack-sdk-compat.sh"
18+
- mkdir $HOME/travisci-tools && pushd $HOME/travisci-tools && git init && git pull https://$CI_USER_TOKEN@github.com/optimizely/travisci-tools.git && popd
3819
script:
39-
- "ci/trigger_fullstack-sdk-compat.sh"
20+
- "$HOME/travisci-tools/fsc-trigger/trigger_fullstack-sdk-compat.sh"
4021
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+
4142
- stage: 'NetStandard16'
4243
language: csharp
4344
# dotnet only works on trusty https://github.com/travis-ci/travis-ci/issues/5189

0 commit comments

Comments
 (0)