我在 GitLab 中有一个 python 项目仓库。我看到 GitLab 共享了可用的测试版 Windows 运行程序(请参阅this https://about.gitlab.com/blog/2020/01/21/windows-shared-runner-beta/ post).
我想知道有没有标准gitlab-ci.yml
Windows 共享运行器上的 python?如果是这样,由于这仍然是测试版,我很好奇它的稳定性如何?对于那些使用过这个并且有 AppVeyor 经验的人来说,我使用 AppVeyor 还是这个更好?
Thanks!
您可以使用这个片段:
my_win_job:
before_script:
# https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers/-/issues/13
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
- choco install python3 --version=$PYTHON_VERSION --yes --force --no-progress
- refreshenv
script:
- python -V
- python -m pip install -U pip wheel
variables:
PYTHON_VERSION: "3.9"
tags:
- windows
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)