-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add windows github action workflow #123
base: master
Are you sure you want to change the base?
Conversation
At the moment I don't believe this will work because it depends on services which require a `runs-on` value of a linux host. Opening this as a draft PR just to track attempts at solving this.
Known issue right now that
|
Hey @derekgroh I don't have any great ideas for how best to handle this, but if you have experience with windows + GH Actions feel free to push fixes to this branch with ideas. |
@webframp Not really, just started trying to play with it. We can try to connect on Slack and maybe figure it out. |
@webframp Can you allow me to push against this branch? |
@derekgroh I think there are several options and it depends on what you want to do:
I am going to write up an issue to better outline what being a maintainer should look like. |
@derekgroh Feel free to open something new based on this branch too, I don't do a lot with Windows these days so this is just sort of a brain dump. I have no problem closing and not merging this. |
Here's what I was able to work out.
---
name: windows
"on":
pull_request:
push:
branches:
- master
jobs:
windows_agent:
runs-on: windows-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Install Chef
uses: actionshub/chef-install@master
- name: Create directory
run: mkdir D:\a\berks-cookbooks\
- name: Create Link
run: cmd /c mklink /d D:\a\cookbooks\ D:\a\berks-cookbooks\
- name: Berks
working-directory: D:\a\
run: berks vendor -b D:\a\sensu-go-chef\sensu-go-chef\Berksfile
- name: Chef Zero
working-directory: D:\a\cookbooks\sensu-go\
env:
CHEF_LICENSE: accept-no-persist
run: chef-client -z -o sensu_test::agent
- name: Verify
run: chef exec inspec exec D:\a\sensu-go-chef\sensu-go-chef\test\integration\agent\agent_spec.rb
env:
CHEF_LICENSE: accept-no-persist
windows_ctl:
runs-on: windows-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Install Chef
uses: actionshub/chef-install@master
- name: Create directory
run: mkdir D:\a\berks-cookbooks\
- name: Create Link
run: cmd /c mklink /d D:\a\cookbooks\ D:\a\berks-cookbooks\
- name: Berks
working-directory: D:\a\
run: berks vendor -b D:\a\sensu-go-chef\sensu-go-chef\Berksfile
- name: Chef Zero
working-directory: D:\a\cookbooks\sensu-go\
env:
CHEF_LICENSE: accept-no-persist
run: chef-client -z -o sensu_test::ctl
# - name: Verify
# run: chef exec inspec exec D:\a\sensu-go-chef\sensu-go-chef\test\integration\ctl\ctl_spec.rb
# env:
# CHEF_LICENSE: accept-no-persist The ctl job fails out with the path and backend not matching, where as test kitchen detects them correctly (see above). This seems like an environment issue with the platform GitHub is using, but I can't be sure. Not sure if the ctl run should be removed or how best to test, I've also changed the test to and list backends instead of users
This allows ctl testing against a running backend, which should always be available |
At the moment I don't believe this will work because it depends on
services which require a
runs-on
value of a linux host.Opening this as a draft PR just to track attempts at solving this.
Pull Request Checklist
Is this in reference to an existing issue?
Yes, #68
General
Update Changelog following the conventions laid out here
Update README with any necessary configuration snippets
Cookstyle (rubocop) passes
Rspec (unit tests) passes
Inspec (integration tests) passes
New Features
Added a Testing Artifact as either an automated test or a manual artifact on the PR.
Added documentation for it to the
README.md
Purpose
Add a GH Action for testing the windows agent in CI
Known Compatibility Issues
In cookbook none. With GH Actions, service containers aren't supported on windows runners.