-
Notifications
You must be signed in to change notification settings - Fork 47
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 #70 from myii/ci/add-windows-testing-via-github-ac…
…tions ci(windows): test using GitHub Actions
- Loading branch information
Showing
14 changed files
with
393 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=yaml | ||
--- | ||
name: 'Kitchen Vagrant (Windows)' | ||
'on': ['push', 'pull_request'] | ||
|
||
env: | ||
KITCHEN_LOCAL_YAML: 'kitchen.vagrant.yml' | ||
|
||
jobs: | ||
test: | ||
runs-on: 'macos-10.15' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
instance: | ||
- windows-windows-81-latest-py3 | ||
steps: | ||
- name: 'Check out code' | ||
uses: 'actions/checkout@v2' | ||
- 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-" | ||
- name: 'Run Bundler' | ||
run: | | ||
ruby --version | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: 'Run Test Kitchen' | ||
run: 'bundle exec kitchen verify ${{ matrix.instance }}' |
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 |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=yaml | ||
--- | ||
name: 'Kitchen (Windows)' | ||
'on': ['push', 'pull_request'] | ||
|
||
env: | ||
machine_user: kitchen | ||
machine_pass: Pass@word1 | ||
machine_port: 5985 | ||
KITCHEN_LOCAL_YAML: 'kitchen.windows.yml' | ||
|
||
jobs: | ||
test-2019: | ||
runs-on: 'windows-2019' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
instance: | ||
- windows-windows-2019-latest-py3 | ||
steps: | ||
- name: 'Check out code' | ||
uses: 'actions/checkout@v2' | ||
- name: 'Install Chef' | ||
uses: 'actionshub/chef-install@1.1.0' | ||
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-" | ||
- 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 | ||
- name: 'Set up WinRM' | ||
run: > | ||
Set-WSManQuickConfig -Force; | ||
Set-WSManInstance -ResourceURI winrm/config/service | ||
-ValueSet @{AllowUnencrypted="true"} | ||
- name: 'Run Bundler' | ||
run: | | ||
ruby --version | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: 'Run Test Kitchen' | ||
run: 'bundle exec kitchen verify ${{ matrix.instance }}' | ||
test-2016: | ||
runs-on: 'windows-2016' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
instance: | ||
- windows-windows-2016-latest-py3 | ||
steps: | ||
- name: 'Check out code' | ||
uses: 'actions/checkout@v2' | ||
- name: 'Install Chef' | ||
uses: 'actionshub/chef-install@1.1.0' | ||
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-" | ||
- 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 | ||
- name: 'Set up WinRM' | ||
run: > | ||
Set-WSManQuickConfig -Force; | ||
Set-WSManInstance -ResourceURI winrm/config/service | ||
-ValueSet @{AllowUnencrypted="true"} | ||
- name: 'Run Bundler' | ||
run: | | ||
ruby --version | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: 'Run Test Kitchen' | ||
run: 'bundle exec kitchen verify ${{ matrix.instance }}' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=yaml | ||
--- | ||
driver: | ||
name: vagrant | ||
cache_directory: false | ||
customize: | ||
usbxhci: 'off' | ||
gui: false | ||
linked_clone: true | ||
ssh: | ||
shell: /bin/sh | ||
|
||
platforms: | ||
- name: windows-81-latest-py3 | ||
driver: | ||
box: techneg/win81x64-pro-salt | ||
cache_directory: "/omnibus/cache" | ||
customize: {} | ||
ssh: {} | ||
provisioner: | ||
salt_install: none | ||
# yamllint disable rule:line-length | ||
init_environment: | | ||
# Workaround to allow `kitchen converge` to be used multiple times | ||
# without having to `kitchen destroy` first: remove state files cached by | ||
# Salt during the previous `converge` (if present) | ||
rm -recurse ` | ||
C:\Users\vagrant\AppData\Local\Temp\kitchen\var\cache\salt\minion\files\base ` | ||
-ErrorAction SilentlyContinue | ||
exit 0 | ||
# yamllint enable rule:line-length | ||
|
||
provisioner: | ||
salt_install: bootstrap |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=yaml | ||
--- | ||
driver: | ||
name: proxy | ||
host: localhost | ||
reset_command: "exit 0" | ||
port: 5985 | ||
username: kitchen | ||
password: Pass@word1 | ||
|
||
platforms: | ||
- name: windows-2019-latest-py3 | ||
- name: windows-2016-latest-py3 | ||
|
||
provisioner: | ||
salt_install: bootstrap | ||
salt_bootstrap_options: -pythonVersion 3 |
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
Oops, something went wrong.