Skip to content
Merged
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
16 changes: 13 additions & 3 deletions .github/actions/presuite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def initialize_beaker
def beaker_platform
{
'ubuntu-20.04' => 'ubuntu2004-64a',
'macos-latest' => 'osx11-64a',
'macos-11' => 'osx11-64a',
'windows-2016' => 'windows2016-64a',
'windows-2019' => 'windows2019-64a'
}[HOST_PLATFORM]
Expand All @@ -48,9 +48,19 @@ def install_puppet_agent
message('INSTALL PUPPET AGENT')

beaker_puppet_root = run('bundle info beaker-puppet --path')
presuite_file_path = File.join(beaker_puppet_root.chomp, 'setup', 'aio', '010_Install_Puppet_Agent.rb')

run("beaker exec pre-suite --pre-suite #{presuite_file_path} --preserve-state", './', env_path_var)
# Bundler/Rubygems can sometimes give output other than the filepath (deprecation warnings, etc.)
begin
if File.exist?(beaker_puppet_root.chomp)
presuite_file_path = File.join(beaker_puppet_root.chomp, 'setup', 'aio', '010_Install_Puppet_Agent.rb')

run("beaker exec pre-suite --pre-suite #{presuite_file_path} --preserve-state", './', env_path_var)
else
exit
end
rescue SystemExit
puts "`bundle info beaker-puppet --path` produced unexpected output, please address this."
end
end

def puppet_puppet_bin_dir
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/acceptance_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Platform
strategy:
matrix:
os: [ windows-2019, ubuntu-20.04, macos-latest ]
os: [ windows-2019, ubuntu-20.04, macos-11 ]
runs-on: ${{ matrix.os }}
env:
BEAKER_debug: true
Expand All @@ -24,14 +24,15 @@ jobs:

steps:
- name: Checkout current PR
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: facter

- name: Install Ruby 2.6
- name: Install Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
ruby-version: '2.7'
rubygems: '3.3.26'

- name: Fix common Linux and macOS permissions
if: runner.os != 'Windows'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ jobs:
name: RuboCop
steps:
- name: Checkout current PR
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Rubocop checks
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
ruby-version: '2.7'
- run: bundle install --jobs 3 --retry 3
- run: bundle exec rubocop --parallel

rtc:
runs-on: ubuntu-20.04
name: RuboCop TODO
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: gimmyxd/[email protected]
env:
RTC_TOKEN: ${{ secrets.RTC_TOKEN }}
Expand All @@ -42,13 +42,13 @@ jobs:
name: commit message
steps:
- name: Checkout current PR
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Commit message checks
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
ruby-version: '2.7'
- run: bundle install --jobs 3 --retry 3
- run: bundle exec rake commits
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: coverage
steps:
- name: Checkout current PR
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Code Climate test-reporter
run: |
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Generate coverage
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
ruby-version: '2.7'
- run: bundle install --jobs 3 --retry 3
- run: bundle exec rake spec

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snyk_monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
name: Snyk Monitor
steps:
- name: Checkout current PR
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: '2.7'
- name: Install dependencies
run: bundle install --jobs 3 --retry 3
- name: Run Snyk to check for vulnerabilities
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout current PR
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Rspec checks
uses: ruby/setup-ruby@v1
Expand All @@ -47,7 +47,7 @@ jobs:
runs-on: windows-2019
steps:
- name: Checkout current PR
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Rspec checks
uses: ruby/setup-ruby@v1
Expand Down
3 changes: 3 additions & 0 deletions spec/mocks/win32.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ def keys; end

def close; end

module API
end

class HKEY_LOCAL_MACHINE
def self.open(*); end

Expand Down