Bump the github-actions group across 1 directory with 3 updates (#303) #370
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # This workflow will build and run all unit tests. | |
| # | |
| name: GitHubExt-CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ "main", "dev" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: x64 | |
| os: windows-latest | |
| configuration: Release | |
| - platform: arm64 | |
| os: windows-11-vs2026-arm | |
| configuration: Release | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| clean: true | |
| - name: Setup .NET SDK (from global.json) | |
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 | |
| with: | |
| global-json-file: global.json | |
| - name: Add MSBuild to PATH | |
| uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3.0.0 | |
| - name: Download nuget | |
| run: | | |
| mkdir ".\.nuget" | |
| Invoke-WebRequest "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -OutFile ".\.nuget\nuget.exe" | |
| - name: Find VsDevCmd.bat | |
| run: | | |
| $VSDevCmd = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere" -latest -find Common7\tools\VSDevCmd.bat | |
| if (!$VSDevCmd) { exit 1 } | |
| echo "Using VSDevCmd: ${VSDevCmd}" | |
| Add-Content $env:GITHUB_ENV "VSDevCmd=$VSDevCmd" | |
| - name: Restore dependencies | |
| run: dotnet restore GitHubExtension.sln -p:PublishReadyToRun=true | |
| - name: Build_CmdPalGitHubExtension | |
| run: cmd /c "$env:VSDevCmd" "&" msbuild /p:Configuration=${{ matrix.configuration }},Platform=${{ matrix.platform }} /restore GitHubExtension.sln | |
| - name: Find vstest.console.exe | |
| run: | | |
| $VSDevTestCmd = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere" -latest -prerelease -products * -find **\TestPlatform\vstest.console.exe | |
| if (!$VSDevTestCmd) { exit 1 } | |
| echo "Using VSDevTestCmd: ${VSDevTestCmd}" | |
| Add-Content $env:GITHUB_ENV "VSDevTestCmd=$VSDevTestCmd" | |
| - name: UnitTests | |
| run: cmd /c "$env:VSDevTestCmd" /Platform:${{ matrix.platform }} /TestCaseFilter:"TestCategory!=LiveData" BuildOutput\\${{ matrix.configuration }}\\${{ matrix.platform }}\\GitHubExtension.Test\\GitHubExtension.Test.dll |