-
Notifications
You must be signed in to change notification settings - Fork 117
/
appveyor.yml
53 lines (46 loc) · 2.03 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
version: "master-{build}"
image: Visual Studio 2019
platform:
- x64
environment:
winrm_user: test_user
winrm_password: Pass@word1
user_cert: c:\projects\winrm\user.pem
user_key: c:\projects\winrm\key.pem
matrix:
- ruby_version: "31"
winrm_endpoint: http://localhost:5985/wsman
- ruby_version: "30"
winrm_endpoint: http://localhost:5985/wsman
clone_folder: c:\projects\winrm
clone_depth: 1
branches:
only:
- master
install:
- ps: net user /add $env:winrm_user $env:winrm_password
- ps: net localgroup administrators $env:winrm_user /add
- ps: $env:PATH="C:\OpenSSL-Win64\bin;$env:PATH"
- ps: Import-Module c:\projects\winrm\WinrmAppveyor.psm1
- ps: New-ClientCertificate $env:winrm_user c:\projects\winrm
- ps: $env:user_cert_thumb = (Import-pfxCertificate -FilePath c:\projects\winrm\user.pfx -CertStoreLocation Cert:\LocalMachine\root).Thumbprint
- ps: Import-pfxCertificate -FilePath c:\projects\winrm\user.pfx -CertStoreLocation Cert:\LocalMachine\TrustedPeople
- ps: $env:winrm_cert = (New-SelfSignedCertificate -DnsName localhost -CertStoreLocation cert:\localmachine\my).Thumbprint
- ps: Enable-PSRemoting -Force
- ps: winrm create winrm/config/Listener?Address=*+Transport=HTTPS "@{Hostname=`"localhost`";CertificateThumbprint=`"$($env:winrm_cert)`"}"
- ps: winrm set winrm/config/client/auth '@{Basic="true"}'
- ps: winrm set winrm/config/service/auth '@{Basic="true"}'
- ps: winrm set winrm/config/service/auth '@{Certificate="true"}'
- ps: winrm set winrm/config/service/auth '@{CbtHardeningLevel="Strict"}'
- ps: winrm set winrm/config/service '@{AllowUnencrypted="true"}'
- ps: New-WinrmUserCertificateMapping $env:user_cert_thumb
- ps: $env:PATH="C:\Ruby$env:ruby_version\bin;$env:PATH"
- ps: Write-Host $env:PATH
- ps: ruby --version
- ps: gem --version
- ps: bundler --version
build_script:
- bundle install || bundle install || bundle install
test_script:
- SET SPEC_OPTS=--format progress
- bundle exec rake integration