From bdb63a97f4b586096b13caffe31be0f7ad409bc8 Mon Sep 17 00:00:00 2001 From: Dan Webb Date: Tue, 5 Apr 2022 12:05:26 +0100 Subject: [PATCH 1/3] Add Windows workflow Relates to #257 Signed-off-by: Dan Webb --- .github/workflows/linters.yml | 16 ++++++++++++++++ .ruby-version | 1 + kitchen.yml | 9 +++++++++ 3 files changed, 26 insertions(+) create mode 100644 .ruby-version diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index e65c5b9..d2cc144 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -54,3 +54,19 @@ jobs: bundle exec bundle exec kitchen destroy hello env: CHEF_LICENSE: "accept-no-persist" + + integration-windows: + runs-on: windows-latest + needs: [mdl, yamllint, chefstyle] + name: Verify Windows containers + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.0 + bundler-cache: true + - name: Create & Validate containers + run: | + bundle exec bundle exec kitchen test chocolatey + env: + CHEF_LICENSE: "accept-no-persist" diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..94ff29c --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.1.1 diff --git a/kitchen.yml b/kitchen.yml index 4490398..b8c8237 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -33,6 +33,10 @@ platforms: volumes: - <%= ENV['PWD'] %>/.git:/opt/kitchen-dokken/.git + - name: windows-2019 + driver: + image: mcr.microsoft.com/windows/servercore:ltsc2022-amd64 + suites: - name: default includes: @@ -84,3 +88,8 @@ suites: - centos driver: ipv6: true + + - name: chocolatey + includes: windows-2019 + run_list: + - recipe[chocolatey::default] From a051d63df952aaa32ff24c44bbf12e62ece0f3ac Mon Sep 17 00:00:00 2001 From: Dan Webb Date: Tue, 5 Apr 2022 14:26:30 +0100 Subject: [PATCH 2/3] Match the runner to the Windows cotainer version Signed-off-by: Dan Webb --- .github/workflows/linters.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index d2cc144..8668d0a 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -56,7 +56,7 @@ jobs: CHEF_LICENSE: "accept-no-persist" integration-windows: - runs-on: windows-latest + runs-on: windows-2019 needs: [mdl, yamllint, chefstyle] name: Verify Windows containers steps: From 5142511a57514639e667b48f1be7d3bd08d31623 Mon Sep 17 00:00:00 2001 From: Dan Webb Date: Tue, 5 Apr 2022 14:34:42 +0100 Subject: [PATCH 3/3] Fix image version Signed-off-by: Dan Webb --- .github/workflows/linters.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 8668d0a..de7ad27 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -40,7 +40,7 @@ jobs: integration: runs-on: ubuntu-latest needs: [mdl, yamllint, chefstyle] - name: Kitchen Verify + name: Verify Hello Suite steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 @@ -67,6 +67,7 @@ jobs: bundler-cache: true - name: Create & Validate containers run: | + docker pull mcr.microsoft.com/windows/servercore:ltsc2019-amd64 bundle exec bundle exec kitchen test chocolatey env: CHEF_LICENSE: "accept-no-persist"