|
| 1 | +version: 2.1 |
| 2 | + |
| 3 | +_run: |
| 4 | + notify_on_fail: ¬ify_on_fail |
| 5 | + when: on_fail |
| 6 | + command: | |
| 7 | + wget https://raw.githubusercontent.com/segmentio/circleci-notifications/master/slack-notify-branch.sh |
| 8 | + chmod u+x slack-notify-branch.sh |
| 9 | + BUILD_STATUS="Failed" NOTIFY_BRANCH="master scheduled_e2e_testing" ./slack-notify-branch.sh |
| 10 | +orbs: |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +jobs: |
| 15 | + build: |
| 16 | + working_directory: /temp |
| 17 | + docker: |
| 18 | + - image: mono:latest |
| 19 | + environment: |
| 20 | + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 |
| 21 | + DOTNET_CLI_TELEMETRY_OUTPUT: 1 |
| 22 | + steps: |
| 23 | + # Update mono to latest version (5.8) |
| 24 | + - run: echo "deb http://download.mono-project.com/repo/ubuntu trusty main" | tee /etc/apt/sources.list.d/mono-official.list |
| 25 | + - run: apt-get update |
| 26 | + - run: apt-get install -y mono-devel |
| 27 | + # Checkout source code and try to build & pack |
| 28 | + - checkout |
| 29 | + - run: msbuild Analytics/Analytics.csproj /t:restore |
| 30 | + - run: msbuild Analytics/Analytics.csproj /p:Configuration=Release |
| 31 | + pack: |
| 32 | + working_directory: /pack |
| 33 | + executor: |
| 34 | + name: win/default |
| 35 | + steps: |
| 36 | + - checkout |
| 37 | + - run: |
| 38 | + name: Generating Nuget Package |
| 39 | + command: dotnet pack -o /packages -c Release Analytics\Analytics.csproj |
| 40 | + - store_artifacts: |
| 41 | + path: /packages/ |
| 42 | + test: |
| 43 | + working_directory: /test |
| 44 | + docker: |
| 45 | + - image: microsoft/dotnet:2.1-sdk |
| 46 | + environment: |
| 47 | + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 |
| 48 | + DOTNET_CLI_TELEMETRY_OUTPUT: 1 |
| 49 | + steps: |
| 50 | + - checkout |
| 51 | + - run: dotnet restore Test/Test.csproj |
| 52 | + - run: dotnet test Test/Test.csproj |
| 53 | + test_20: |
| 54 | + working_directory: /test20 |
| 55 | + docker: |
| 56 | + - image: microsoft/dotnet:2.0-sdk |
| 57 | + environment: |
| 58 | + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 |
| 59 | + DOTNET_CLI_TELEMETRY_OUTPUT: 1 |
| 60 | + steps: |
| 61 | + - checkout |
| 62 | + - run: dotnet restore Test.NetStandard20/Test.NetStandard20.csproj |
| 63 | + - run: dotnet test Test.NetStandard20/Test.NetStandard20.csproj |
| 64 | + test_35: |
| 65 | + working_directory: /test35 |
| 66 | + docker: |
| 67 | + - image: mono:latest |
| 68 | + environment: |
| 69 | + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 |
| 70 | + DOTNET_CLI_TELEMETRY_OUTPUT: 1 |
| 71 | + steps: |
| 72 | + - checkout |
| 73 | + - run: nuget restore Test.Net35/Test.Net35.csproj -SolutionDirectory ./ |
| 74 | + - run: msbuild Test.Net35/Test.Net35.csproj /t:restore |
| 75 | + - run: msbuild Test.Net35/Test.Net35.csproj /p:Configuration=Release |
| 76 | + - run: mono --debug ./packages/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe Test.Net35/bin/Release/Test.Net35.dll |
| 77 | + test_45: |
| 78 | + working_directory: /test45 |
| 79 | + docker: |
| 80 | + - image: mono:latest |
| 81 | + environment: |
| 82 | + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 |
| 83 | + DOTNET_CLI_TELEMETRY_OUTPUT: 1 |
| 84 | + steps: |
| 85 | + - checkout |
| 86 | + - run: nuget restore Test.Net45/Test.Net45.csproj -SolutionDirectory ./ |
| 87 | + - run: msbuild Test.Net45/Test.Net45.csproj /t:restore |
| 88 | + - run: msbuild Test.Net45/Test.Net45.csproj /p:Configuration=Release |
| 89 | + - run: mono --debug ./packages/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe Test.Net45/bin/Release/Test.Net45.dll |
| 90 | + test_e2e: |
| 91 | + working_directory: /test_e2e |
| 92 | + docker: |
| 93 | + - image: microsoft/dotnet:1.1.1-sdk |
| 94 | + environment: |
| 95 | + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 |
| 96 | + DOTNET_CLI_TELEMETRY_OUTPUT: 1 |
| 97 | + steps: |
| 98 | + - checkout |
| 99 | + - run: dotnet restore Test.E2E/Test.E2E.csproj |
| 100 | + - run: dotnet build Test.E2E/Test.E2E.csproj |
| 101 | + - run: cd Test.E2E/ && ./e2e.sh |
| 102 | + - run: *notify_on_fail |
| 103 | + |
| 104 | +workflows: |
| 105 | + version: 2 |
| 106 | + build_and_test: |
| 107 | + jobs: |
| 108 | + - build |
| 109 | + - test |
| 110 | + - test_20 |
| 111 | + - test_35 |
| 112 | + - test_45 |
| 113 | + - test_e2e |
| 114 | + - pack: |
| 115 | + requires: |
| 116 | + - build |
| 117 | + - test_e2e |
| 118 | + scheduled_e2e_test: |
| 119 | + triggers: |
| 120 | + - schedule: |
| 121 | + cron: "25 * * * *" |
| 122 | + filters: |
| 123 | + branches: |
| 124 | + only: |
| 125 | + - master |
| 126 | + - scheduled_e2e_testing |
| 127 | + jobs: |
| 128 | + - test_e2e |
0 commit comments