|
| 1 | +name: Regression Tests |
| 2 | +# https://dotnet.microsoft.com/download/dotnet-core |
| 3 | +# https://dotnet.microsoft.com/download/dotnet-framework |
| 4 | + |
| 5 | +on: |
| 6 | + [ push ] |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + runs-on: windows-latest |
| 11 | + steps: |
| 12 | + - name: Checkout |
| 13 | + uses: actions/checkout@v2 |
| 14 | + |
| 15 | + - name: Cache |
| 16 | + id: unity-abstractions |
| 17 | + uses: actions/cache@v1 |
| 18 | + with: |
| 19 | + path: '${{ github.workspace }}/package' |
| 20 | + key: ${{ github.sha }} |
| 21 | + |
| 22 | + - name: Build Package |
| 23 | + env: |
| 24 | + PackageVersion: '0.0.0' |
| 25 | + PackageOutputPath: '${{ github.workspace }}/package' |
| 26 | + run: dotnet msbuild -property:Configuration=Release -verbosity:m -restore:True src |
| 27 | + |
| 28 | + net: |
| 29 | + needs: [ Build ] |
| 30 | + strategy: |
| 31 | + matrix: |
| 32 | + framework: ['net48', 'net47', 'net46', 'net45'] |
| 33 | + runs-on: windows-latest |
| 34 | + |
| 35 | + steps: |
| 36 | + - name: Checkout |
| 37 | + uses: actions/checkout@v2 |
| 38 | + |
| 39 | + - name: Cache |
| 40 | + id: unity-abstractions |
| 41 | + uses: actions/cache@v1 |
| 42 | + with: |
| 43 | + path: '${{ github.workspace }}/package' |
| 44 | + key: ${{ github.sha }} |
| 45 | + |
| 46 | + - name: Build Package |
| 47 | + env: |
| 48 | + TargetFramework: ${{ matrix.framework }} |
| 49 | + run: | |
| 50 | + dotnet remove ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj reference "..\src\Unity.Abstractions.csproj" |
| 51 | + dotnet add ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj package --source '${{ github.workspace }}/package' Unity.Abstractions --version 0.0.0 |
| 52 | + dotnet msbuild -property:Configuration=Release -verbosity:m -restore:True ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj |
| 53 | +
|
| 54 | + - name: Test |
| 55 | + env: |
| 56 | + TargetFramework: ${{ matrix.framework }} |
| 57 | + run: dotnet test ${{ github.workspace }}/tests/bin/Release/${{ matrix.framework }}/Unity.Abstractions.Tests.dll |
| 58 | + |
| 59 | + |
| 60 | + core-lts-2: |
| 61 | + needs: [ Build ] |
| 62 | + strategy: |
| 63 | + matrix: |
| 64 | + os: [windows-latest, ubuntu-latest] |
| 65 | + runs-on: ${{ matrix.os }} |
| 66 | + |
| 67 | + steps: |
| 68 | + - name: Checkout |
| 69 | + uses: actions/checkout@v2 |
| 70 | + |
| 71 | + - name: Install DotNet |
| 72 | + uses: actions/setup-dotnet@v1 |
| 73 | + with: |
| 74 | + dotnet-version: '2.1.806' |
| 75 | + |
| 76 | + - name: Install Nuget |
| 77 | + uses: nuget/setup-nuget@v1 |
| 78 | + |
| 79 | + - name: Cache |
| 80 | + id: unity-abstractions |
| 81 | + uses: actions/cache@v1 |
| 82 | + with: |
| 83 | + path: '${{ github.workspace }}/package' |
| 84 | + key: ${{ github.sha }} |
| 85 | + |
| 86 | + - name: Build Package |
| 87 | + env: |
| 88 | + TargetFramework: netcoreapp2.1 |
| 89 | + run: | |
| 90 | + nuget add ${{ github.workspace }}/package/Unity.Abstractions.0.0.0.nupkg -Source packages |
| 91 | + dotnet remove ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj reference "..\src\Unity.Abstractions.csproj" |
| 92 | + dotnet add ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj package --source packages Unity.Abstractions --version 0.0.0 |
| 93 | + dotnet msbuild -property:Configuration=Release -verbosity:m -restore:True ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj |
| 94 | +
|
| 95 | + - name: Test |
| 96 | + env: |
| 97 | + TargetFramework: netcoreapp2.1 |
| 98 | + run: dotnet vstest ${{ github.workspace }}/tests/bin/Release/netcoreapp2.1/Unity.Abstractions.Tests.dll |
| 99 | + |
| 100 | + |
| 101 | + core-lts-3: |
| 102 | + needs: [ Build ] |
| 103 | + strategy: |
| 104 | + matrix: |
| 105 | + os: [windows-latest, ubuntu-latest, macos-latest] |
| 106 | + runs-on: ${{ matrix.os }} |
| 107 | + |
| 108 | + steps: |
| 109 | + - name: Checkout |
| 110 | + uses: actions/checkout@v2 |
| 111 | + |
| 112 | + - name: Install DotNet |
| 113 | + uses: actions/setup-dotnet@v1 |
| 114 | + with: |
| 115 | + dotnet-version: '3.1.202' |
| 116 | + |
| 117 | + - name: Cache |
| 118 | + id: unity-abstractions |
| 119 | + uses: actions/cache@v1 |
| 120 | + with: |
| 121 | + path: '${{ github.workspace }}/package' |
| 122 | + key: ${{ github.sha }} |
| 123 | + |
| 124 | + - name: Build Package |
| 125 | + env: |
| 126 | + TargetFramework: netcoreapp3.1 |
| 127 | + run: | |
| 128 | + dotnet remove ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj reference "..\src\Unity.Abstractions.csproj" |
| 129 | + dotnet add ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj package --source '${{ github.workspace }}/package' Unity.Abstractions --version 0.0.0 |
| 130 | + dotnet msbuild -property:Configuration=Release -verbosity:m -restore:True ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj |
| 131 | +
|
| 132 | + - name: Test |
| 133 | + env: |
| 134 | + TargetFramework: netcoreapp3.1 |
| 135 | + run: dotnet test ${{ github.workspace }}/tests/bin/Release/netcoreapp3.1/Unity.Abstractions.Tests.dll |
0 commit comments