Skip to content

Add tests workflow

Add tests workflow #3

Workflow file for this run

name: Run Tests
on:
push:
pull_request:
type: [ labeled ]
jobs:
build:
runs-on: windows-latest
env:
JFROG_CLI_VERSION: '2.67.0'
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
with:
vs-version: 'latest'
- name: Cache NuGet packages # optimizing the build process
uses: actions/cache@v3
with:
path: |
~/.nuget/packages
key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }}
restore-keys: |
nuget-${{ runner.os }}-
- name: Restore dependencies
run: |
dotnet restore
nuget restore
- name: Download JFrog CLI executable
run: |
powershell -Command "Start-Process -Wait -Verb RunAs powershell '-NoProfile iwr https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/${{ env.JFROG_CLI_VERSION }}/jfrog-cli-windows-amd64/jf.exe -OutFile ./JFrogVSExtension/Resources/jfrog.exe'"
- 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
- name: Run tests
run: dotnet test --no-build --verbosity normal