Skip to content
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

(CAT-1940) Move Windows testing onto the GCP #1373

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
matrix:
os:
- "ubuntu-latest"
- "windows-2019"
ruby_version:
- "2.7"
- "3.2"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
matrix:
os:
- "ubuntu-latest"
- "windows-2019"
ruby_version:
- "2.7"
- "3.2"
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/windows-acceptance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This is a generic workflow for gem Acceptance operations.
name: "Windows Acceptance"

on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
workflow_dispatch:

jobs:
acceptance:
name: "acceptance"
runs-on: 'ubuntu-latest'
timeout-minutes: 180
strategy:
fail-fast: false

env:
PUPPET_VERSION: puppet8-nightly
PUPPET_GEM_VERSION: puppet8-nightly

steps:

- name: "checkout"
uses: "actions/checkout@v4"

- name: "setup ruby"
uses: "ruby/setup-ruby@v1"
with:
ruby-version: '3.2'
bundler-cache: true

- name: "Bundle environment"
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::

- name: "Provision environment"
run: |
bundle exec rake "litmus:provision[provision_service,windows-2019]"
# Redact password
FILE='spec/fixtures/litmus_inventory.yaml'
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true

- name: "Run acceptance tests"
run: |
bundle exec rake 'litmus:acceptance:parallel'

# - name: "Remove test environment"
# continue-on-error: true
# run: |
# if [[ -f spec/fixtures/litmus_inventory.yaml ]]; then
# bundle exec rake 'litmus:tear_down'
# fi
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ end

group :acceptance_ci do
gem 'puppetlabs_spec_helper', '~> 7.0', require: false
gem 'puppet_litmus', '~> 1.0', require: false
end
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'bundler/gem_tasks'
require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
require 'puppetlabs_spec_helper/rake_tasks'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'

Expand Down
3 changes: 3 additions & 0 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
require 'pdk/util/template_uri'
require 'tempfile'
require 'json'
require 'puppet_litmus'

PuppetLitmus.configure!

# Sets default puppet/ruby versions to be used within the tests
# Duplicates of this are found within spec_helper.rb and spec_helper_package.rb and should be updated simultaneously.
Expand Down
Loading