【发布时间】:2019-09-24 07:49:32
【问题描述】:
试图通过 gitlab ci yml 中的 powershell 调用 mstest.exe。
当我将路径指定为C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe powershell 时,会出现错误提示C:\program no such cmdlet function exists。
当我在引号中给出路径时,我得到一个无效的 yml 错误:
This GitLab CI configuration is invalid: (<unknown>): found unknown escape character while parsing a quoted scalar at line 26 column 17
test_job:
stage: test
variables:
MSTestPath: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe"
TestContainer: "/testcontainer: +$ProjectDLL"
TestName: "/test:+$TestName"
TestSettings: "/testsettings: +$TestSettingsPath"
script:
- echo "testing..."
- powershell '&' $MSTestPatch $TestContainer $TestName $TestSettings
only:
- master
tags:
- migration
我想在我的运行器(这是我的 Windows 机器)中使用 gitlab CI 执行我的 mstest,使用 powershell 作为 shell。
【问题讨论】:
标签: c# powershell yaml mstest gitlab-ci