|
| 1 | +# This is a basic workflow to help you get started with Actions |
| 2 | + |
| 3 | +name: CI |
| 4 | + |
| 5 | +env: |
| 6 | + config: Release |
| 7 | + githubvsSolution: GitHubVS.sln |
| 8 | + vsixContainer: ${{ github.workspace }}\GitHub.VisualStudio.vsix |
| 9 | + |
| 10 | +# Controls when the action will run. Triggers the workflow on push or pull request |
| 11 | +# events but only for the master branch |
| 12 | +on: |
| 13 | + push: |
| 14 | + branches: [ master ] |
| 15 | + pull_request: |
| 16 | + branches: [ master ] |
| 17 | + |
| 18 | +# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 19 | +jobs: |
| 20 | + # This workflow contains a single job called "build" |
| 21 | + build: |
| 22 | + # The type of runner that the job will run on |
| 23 | + runs-on: windows-latest |
| 24 | + |
| 25 | + # Steps represent a sequence of tasks that will be executed as part of the job |
| 26 | + steps: |
| 27 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 28 | + - uses: actions/checkout@v1 |
| 29 | + with: |
| 30 | + submodules: true |
| 31 | + |
| 32 | + - name: Nerdbank.GitVersioning |
| 33 | + uses: aarnott/nbgv@v0.3 |
| 34 | + id: nbgv |
| 35 | + |
| 36 | + - name: Add MSBuild to PATH |
| 37 | + uses: microsoft/setup-msbuild@v1.0.0 |
| 38 | + |
| 39 | + - uses: nuget/setup-nuget@v1 |
| 40 | + with: |
| 41 | + nuget-version: '5.x' |
| 42 | + |
| 43 | + - name: Add VSTest to PATH |
| 44 | + uses: darenm/Setup-VSTest@v1 |
| 45 | + |
| 46 | + - name: NuGet restore ${{ env.githubvsSolution }} |
| 47 | + run: nuget restore ${{ env.githubvsSolution }} |
| 48 | + |
| 49 | + - name: MSBuild ${{ env.githubvsSolution }} |
| 50 | + run: | |
| 51 | + msbuild ${{ env.githubvsSolution }} /p:Configuration=${{ env.config }} /p:TargetVsixContainer=${{ env.vsixContainer }} /p:DeployExtension=False /verbosity:minimal |
| 52 | + env: |
| 53 | + GitHubVS_ClientId: ${{ secrets.GitHubVS_ClientId }} |
| 54 | + GitHubVS_ClientSecret: ${{ secrets.GitHubVS_ClientSecret }} |
| 55 | + |
| 56 | + - name: Upload VSIX artifact |
| 57 | + uses: actions/upload-artifact@v1 |
| 58 | + with: |
| 59 | + name: GitHubVS-${{ steps.nbgv.outputs.SemVer2 }} |
| 60 | + path: ${{ env.vsixContainer }} |
| 61 | + |
| 62 | + # We need to run '**\bin\**\*Tests.dll' |
| 63 | + - run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.App.UnitTests\bin\${{ env.config }}\net46\GitHub.App.UnitTests.dll |
| 64 | + continue-on-error: true |
| 65 | + - run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.Exports.Reactive.UnitTests\bin\${{ env.config }}\net46\GitHub.Exports.Reactive.UnitTests.dll |
| 66 | + continue-on-error: true |
| 67 | + - run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.Exports.UnitTests\bin\${{ env.config }}\net46\GitHub.Exports.UnitTests.dll |
| 68 | + continue-on-error: true |
| 69 | + - run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.Extensions.UnitTests\bin\${{ env.config }}\net46\GitHub.Extensions.UnitTests.dll |
| 70 | + continue-on-error: true |
| 71 | + - run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.InlineReviews.UnitTests\bin\${{ env.config }}\net46\GitHub.InlineReviews.UnitTests.dll |
| 72 | + continue-on-error: true |
| 73 | + - run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.Services.Vssdk.UnitTests\bin\${{ env.config }}\net461\GitHub.Services.Vssdk.UnitTests.dll |
| 74 | + continue-on-error: true |
| 75 | + - run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.StartPage.UnitTests\bin\${{ env.config }}\net46\GitHub.StartPage.UnitTests.dll |
| 76 | + continue-on-error: true |
| 77 | + - run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.TeamFoundation.UnitTests\bin\${{ env.config }}\net46\GitHub.TeamFoundation.UnitTests.dll |
| 78 | + continue-on-error: true |
| 79 | + - run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.UI.UnitTests\bin\${{ env.config }}\net46\GitHub.UI.UnitTests.dll |
| 80 | + continue-on-error: true |
| 81 | + - run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.VisualStudio.UnitTests\bin\${{ env.config }}\net46\GitHub.VisualStudio.UnitTests.dll |
| 82 | + continue-on-error: true |
| 83 | + - run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\MetricsTests\MetricsTests\bin\${{ env.config }}\MetricsTests.dll |
| 84 | + continue-on-error: true |
0 commit comments