diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 432474d..07cf8ee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,7 @@ name: Run Tests on: push: pull_request: - type: [ labeled ] + type: [ labeled ] jobs: build: @@ -12,11 +12,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 - - - name: Setup .NET SDK - uses: actions/setup-dotnet@v3 - with: - dotnet-version: '6.0' - name: Setup MSBuild uses: microsoft/setup-msbuild@v1 @@ -26,26 +21,24 @@ jobs: - name: Cache NuGet packages # optimizing the build process uses: actions/cache@v3 with: - path: | - ~/.nuget/packages + path: ~/.nuget/packages key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }} - restore-keys: | - nuget-${{ runner.os }}- + restore-keys: nuget-${{ runner.os }}- - name: Restore dependencies run: | dotnet restore nuget restore - - name: Download JFrog CLI executable + - name: Download JFrog CLI executable env: - JFROG_CLI_VERSION: ${{ env.JFROG_CLI_VERSION }} - run: | - .\JFrogVSExtension\Resources\DownloadJfrogCli.ps1 + JFROG_CLI_VERSION: '2.67.0' # jfrog cli version can be changed here + run: .\JFrogVSExtension\Resources\DownloadJfrogCli.ps1 shell: pwsh - name: Build VSIX Project # build the vsix project using multi-core compilation and parallel builds - run: msbuild ./JFrogVSExtension/ /p:Configuration=Release /p:Platform="AnyCPU" /p:BuildInParallel=true /m + run: msbuild JFrogVSExtension.sln /p:Configuration=Release /p:Platform="Any CPU" /p:BuildInParallel=true /m + + - name: Run MSTest Project # run tests in release mode with logs presentation + run: dotnet test --no-build dotnet test --configuration Release --logger "console;verbosity=detailed" ./UnitTestJfrogVSExtension/bin/Release/UnitTestJfrogVSExtension.dll - - name: Run tests - run: dotnet test --no-build --verbosity normal \ No newline at end of file