Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use mstest in github actions?

tried specifying the location in the github actions for mstest "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\MSTest.exe".

But it says cannot find path as it does not exist.

like image 929
akay Avatar asked Sep 20 '25 06:09

akay


1 Answers

Is you pipeline using the Setup Msbuild task?

Here is an example of pipeline to display MsTest's help:

name: Display MsTest helper

on:
  push:
    branches:
      - '**' 

jobs:
  build:
    runs-on: windows-latest

    steps:
      - name: setup-msbuild
        uses: microsoft/setup-msbuild@v1

      - name: Run a one-line script
        run:  '& "$(vswhere -property installationPath)\Common7\IDE\MSTest.exe" /help'
like image 177
Lucas Avatar answered Sep 23 '25 11:09

Lucas