-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from dafyddj/ci/chef-workst
ci(kitchen): improve Windows testing
- Loading branch information
Showing
5 changed files
with
25 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: CI | ||
name: kitchen | ||
|
||
'on': [push, pull_request] | ||
|
||
|
@@ -10,30 +10,44 @@ env: | |
KITCHEN_LOCAL_YAML: kitchen.github.yml | ||
|
||
jobs: | ||
build: | ||
test: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v1 | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Install Chef | ||
uses: actionshub/[email protected] | ||
with: | ||
project: chef | ||
version: 16.10.8 | ||
- name: Add Chef bindir to PATH | ||
uses: myci-actions/export-env-var-powershell@1 | ||
with: | ||
name: PATH | ||
value: "C:\\opscode\\chef\\bin;\ | ||
C:\\opscode\\chef\\embedded\\bin;$env:PATH" | ||
- name: Set up Bundler cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
- shell: powershell | ||
- name: Set up test user | ||
run: | | ||
$password = ConvertTo-SecureString $env:machine_pass -AsPlainText -Force | ||
New-LocalUser $env:machine_user -Password $password | ||
Add-LocalGroupMember -Group "Administrators" -Member $env:machine_user | ||
- shell: powershell | ||
- name: Set up WinRM | ||
run: > | ||
Set-WSManQuickConfig -Force; | ||
Set-WSManInstance -ResourceURI winrm/config/service | ||
-ValueSet @{AllowUnencrypted="true"} | ||
- run: gem install bundler --quiet --no-document | ||
- name: Bundle install | ||
- name: Run Bundler | ||
run: | | ||
ruby --version | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- run: bundle exec kitchen test | ||
- name: Run Test Kitchen | ||
run: bundle exec kitchen verify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters