Skip to content

Commit

Permalink
using dotnet test to run the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kerenr-jfrog committed Sep 17, 2024
1 parent b88724e commit 677b437
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Run Tests
on:
push:
pull_request:
type: [ labeled ]
type: [ labeled ]

jobs:
build:
Expand All @@ -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
Expand All @@ -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

0 comments on commit 677b437

Please sign in to comment.