Skip to content

Commit

Permalink
ci(github): add Windows testing using Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dafyddj committed Jun 9, 2020
1 parent 372b3b6 commit 2d4b79c
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: CI

'on': [push, pull_request]

env:
machine_user: kitchen
machine_pass: Pass@word1
machine_port: 5985
KITCHEN_LOCAL_YAML: kitchen.github.yml

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- shell: powershell
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
run: >
Set-WSManQuickConfig -Force;
Set-WSManInstance -ResourceURI winrm/config/service
-ValueSet @{AllowUnencrypted="true"}
- run: gem install bundler --quiet --no-document
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- run: bundle exec kitchen test
20 changes: 20 additions & 0 deletions kitchen.github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
driver:
name: proxy
host: localhost
reset_command: "exit 0"
port: 5985
username: kitchen
password: Pass@word1

platforms:
- name: windows

provisioner:
salt_install: bootstrap
salt_bootstrap_options: -pythonVersion 3
init_environment: >
C:\salt\salt-call --local state.single file.managed
C:\Users\kitchen\AppData\Local\Temp\kitchen\srv\salt\win\repo-ng\openvpn.sls
source=https://github.com/saltstack/salt-winrepo-ng/raw/master/openvpn.sls
skip_verify=True makedirs=True

0 comments on commit 2d4b79c

Please sign in to comment.