File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
2- name : CI
2+ name : kitchen
33
44' on ' : [push, pull_request]
55
1010 KITCHEN_LOCAL_YAML : kitchen.github.yml
1111
1212jobs :
13- build :
13+ test :
1414 runs-on : windows-latest
1515
1616 steps :
17- - uses : actions/checkout@v2
18- - uses : actions/cache@v1
17+ - name : Check out code
18+ uses : actions/checkout@v2
19+ - name : Install Chef
20+ uses : actionshub/chef-install@1.1.0
21+ with :
22+ project : chef
23+ version : 16.10.8
24+ - name : Add Chef bindir to PATH
25+ uses : myci-actions/export-env-var-powershell@1
26+ with :
27+ name : PATH
28+ value : " C:\\ opscode\\ chef\\ bin;\
29+ C:\\ opscode\\ chef\\ embedded\\ bin;$env:PATH"
30+ - name : Set up Bundler cache
31+ uses : actions/cache@v1
1932 with :
2033 path : vendor/bundle
2134 key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
2235 restore-keys : |
2336 ${{ runner.os }}-gems-
24- - shell : powershell
37+ - name : Set up test user
2538 run : |
2639 $password = ConvertTo-SecureString $env:machine_pass -AsPlainText -Force
2740 New-LocalUser $env:machine_user -Password $password
2841 Add-LocalGroupMember -Group "Administrators" -Member $env:machine_user
29- - shell : powershell
42+ - name : Set up WinRM
3043 run : >
3144 Set-WSManQuickConfig -Force;
3245 Set-WSManInstance -ResourceURI winrm/config/service
3346 -ValueSet @{AllowUnencrypted="true"}
34- - run : gem install bundler --quiet --no-document
35- - name : Bundle install
47+ - name : Run Bundler
3648 run : |
49+ ruby --version
3750 bundle config path vendor/bundle
3851 bundle install --jobs 4 --retry 3
39- - run : bundle exec kitchen test
52+ - name : Run Test Kitchen
53+ run : bundle exec kitchen verify
Original file line number Diff line number Diff line change 22
33source 'https://rubygems.org'
44
5- # Versions of `chef-utils` newer than `16.6.14` depend on Ruby 2.6 or
6- # newer, but the GitHub Actions Windows image comes with Ruby 2.5.8
7- gem 'chef-utils' , '~> 16.6.14'
85# Use the latest version of `inspec` prior to `4.23.4`, which introduces a
96# regression where the diff isn't displayed when comparing using `eq`.
107gem 'inspec' , '~> 4.22.22'
Original file line number Diff line number Diff line change @@ -525,7 +525,6 @@ PLATFORMS
525525 ruby
526526
527527DEPENDENCIES
528- chef-utils (~> 16.6.14 )
529528 inspec (~> 4.22.22 )
530529 kitchen-docker !
531530 kitchen-inspec (>= 2.2.1 )
Original file line number Diff line number Diff line change @@ -18,4 +18,3 @@ provisioner:
1818 C:\Users\kitchen\AppData\Local\Temp\kitchen\srv\salt\win\repo-ng\openvpn.sls `
1919 source=https://github.com/saltstack/salt-winrepo-ng/raw/master/openvpn.sls `
2020 skip_verify=True makedirs=True
21- exit 0
Original file line number Diff line number Diff line change @@ -13,13 +13,12 @@ platforms:
1313 provisioner :
1414 init_environment : |
1515 # Workaround to allow `kitchen converge` to be used multiple times
16- # without having to `kitchen destroy` first: remove state files copied
17- # across during the previous `converge` (if present)
16+ # without having to `kitchen destroy` first: remove state files cached by
17+ # Salt during the previous `converge` (if present)
1818 rm -recurse `
1919 C:\Users\vagrant\AppData\Local\Temp\kitchen\var\cache\salt\minion\files\base `
2020 -ErrorAction SilentlyContinue
2121 salt-call --local state.single file.managed `
2222 C:\Users\vagrant\AppData\Local\Temp\kitchen\srv\salt\win\repo-ng\openvpn.sls `
2323 source=https://github.com/saltstack/salt-winrepo-ng/raw/master/openvpn.sls `
2424 skip_verify=True makedirs=True
25- exit 0
You can’t perform that action at this time.
0 commit comments