Skip to content

Commit

Permalink
Move tests to provision + litmus
Browse files Browse the repository at this point in the history
  • Loading branch information
david22swan committed Jul 3, 2024
1 parent 9700db9 commit 12694a7
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 68 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/windows-acceptance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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: "print inventory"
run: |
cat ./spec/fixtures/litmus_inventory.yaml
sleep 300
# Sleep for 5 minutes to allow the machine to boot

- 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
67 changes: 0 additions & 67 deletions .github/workflows/windows-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion spec/acceptance/build_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'template-ref' => 'heads/main-0-g1234abc'
}

context "#{RbConfig::CONFIG['host_os']}" do
context 'when the module has complete metadata' do
before(:all) do
File.open('metadata.json', 'w') do |f|
f.puts metadata.to_json
Expand Down

0 comments on commit 12694a7

Please sign in to comment.