|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - github-workflow |
| 8 | +jobs: |
| 9 | + Build: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + |
| 12 | + steps: |
| 13 | + - name: Checkout latest |
| 14 | + uses: actions/checkout@v2 |
| 15 | + |
| 16 | + - name: Setup .NET Core |
| 17 | + uses: actions/setup-dotnet@v1 |
| 18 | + with: |
| 19 | + dotnet-version: 8.* |
| 20 | + |
| 21 | + - name: Install dependencies |
| 22 | + run: dotnet restore |
| 23 | + |
| 24 | + - name: Build |
| 25 | + run: dotnet build --configuration Release --no-restore |
| 26 | + |
| 27 | + - name: Upload Artificats |
| 28 | + uses: actions/upload-artifact@v4 |
| 29 | + with: |
| 30 | + name: TestBinaries |
| 31 | + path: HttpTwo.Tests/**/bin/* |
| 32 | + |
| 33 | + UnitTest: |
| 34 | + name: Run Unit Tests |
| 35 | + needs: Build |
| 36 | + runs-on: windows-latest |
| 37 | + steps: |
| 38 | + - name: Checkout latest |
| 39 | + uses: actions/checkout@v2 |
| 40 | + |
| 41 | + - name: Use Node.js |
| 42 | + uses: actions/setup-node@v4 |
| 43 | + with: |
| 44 | + node-version: "20.x" |
| 45 | + |
| 46 | + - name: Setup .NET Core |
| 47 | + uses: actions/setup-dotnet@v1 |
| 48 | + with: |
| 49 | + dotnet-version: 6.* |
| 50 | + |
| 51 | + - uses: actions/download-artifact@v4 |
| 52 | + with: |
| 53 | + name: TestBinaries |
| 54 | + path: HttpTwo.Tests |
| 55 | + |
| 56 | + - name: Install dependencies |
| 57 | + working-directory: ./HttpTwo.Tests/node-http2 |
| 58 | + run: npm install |
| 59 | + |
| 60 | + - name: Unit Test (.NET 6.0) |
| 61 | + if: ${{ !cancelled() }} |
| 62 | + run: dotnet test --verbosity normal --logger "trx;LogFileName=net6.trx" --results-directory coverage bin/Release/net6.0/HttpTwo.Tests.dll |
| 63 | + working-directory: ./HttpTwo.Tests |
| 64 | + |
| 65 | + - name: Unit Test (.NET Framework 4.6.2) |
| 66 | + if: ${{ !cancelled() }} |
| 67 | + run: dotnet test --verbosity normal --logger "trx;LogFileName=net462.trx" --results-directory coverage bin/Release/net462/HttpTwo.Tests.dll |
| 68 | + working-directory: ./HttpTwo.Tests |
| 69 | + |
| 70 | + - uses: dorny/test-reporter@v1 |
| 71 | + if: success() || failure() # run this step even if previous step failed |
| 72 | + with: |
| 73 | + name: Test Result |
| 74 | + path: HttpTwo.Tests/coverage/*.trx |
| 75 | + reporter: dotnet-trx |
0 commit comments