File tree Expand file tree Collapse file tree 3 files changed +61
-2
lines changed Expand file tree Collapse file tree 3 files changed +61
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : CI
3
+
4
+ ' on ' : [push, pull_request]
5
+
6
+ env :
7
+ machine_user : kitchen
8
+ machine_pass : Pass@word1
9
+ machine_port : 5985
10
+ KITCHEN_LOCAL_YAML : kitchen.github.yml
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : windows-latest
15
+
16
+ steps :
17
+ - uses : actions/checkout@v2
18
+ - uses : actions/cache@v1
19
+ with :
20
+ path : vendor/bundle
21
+ key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
22
+ restore-keys : |
23
+ ${{ runner.os }}-gems-
24
+ - shell : powershell
25
+ run : |
26
+ $password = ConvertTo-SecureString $env:machine_pass -AsPlainText -Force
27
+ New-LocalUser $env:machine_user -Password $password
28
+ Add-LocalGroupMember -Group "Administrators" -Member $env:machine_user
29
+ - shell : powershell
30
+ run : >
31
+ Set-WSManQuickConfig -Force;
32
+ Set-WSManInstance -ResourceURI winrm/config/service
33
+ -ValueSet @{AllowUnencrypted="true"}
34
+ - run : gem install bundler --quiet --no-document
35
+ - name : Bundle install
36
+ run : |
37
+ bundle config path vendor/bundle
38
+ bundle install --jobs 4 --retry 3
39
+ - run : bundle exec kitchen test
Original file line number Diff line number Diff line change
1
+ ---
2
+ driver :
3
+ name : proxy
4
+ host : localhost
5
+ reset_command : " exit 0"
6
+ port : 5985
7
+ username : kitchen
8
+ password : Pass@word1
9
+
10
+ platforms :
11
+ - name : windows
12
+
13
+ provisioner :
14
+ salt_install : bootstrap
15
+ salt_bootstrap_options : -pythonVersion 3
16
+ init_environment : >
17
+ C:\salt\salt-call --local state.single file.managed
18
+ C:\Users\kitchen\AppData\Local\Temp\kitchen\srv\salt\win\repo-ng\openvpn.sls
19
+ source=https://github.com/saltstack/salt-winrepo-ng/raw/master/openvpn.sls
20
+ skip_verify=True makedirs=True
Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ if ($PSCmdlet.ParameterSetName -eq 'new') {
12
12
Write-Host " changed=no comment=`' TAP-Windows adapter $New exists`' "
13
13
exit
14
14
}
15
- if (-Not (Get-NetAdapter - InterfaceDescription $tapDesc | Where-Object Name -Like Eth * )) {
15
+ if (-Not (Get-NetAdapter - InterfaceDescription $tapDesc | Where-Object Name -Match " ^(Ethernet|Local Area Connection) " )) {
16
16
$p = Start-Process $tapInstallCmd - ArgumentList $tapInstallArgs - NoNewWindow - Wait - PassThru
17
17
}
18
- Get-NetAdapter - InterfaceDescription $tapDesc | Where-Object Name -Like Eth * `
18
+ Get-NetAdapter - InterfaceDescription $tapDesc | Where-Object Name -Match " ^(Ethernet|Local Area Connection) " `
19
19
| Select-Object - First 1 | Rename-NetAdapter - NewName $New
20
20
Write-Host " changed=yes comment=`' TAP-Windows adapter $New created`' "
21
21
}
You can’t perform that action at this time.
0 commit comments