Skip to content
Merged
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
42 changes: 30 additions & 12 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,30 @@ jobs:
- id: ruby
uses: voxpupuli/ruby-version@v1

cache_modules:
runs-on: ubuntu-24.04
name: 'Run r10k and update module cache'
steps:
- uses: actions/checkout@v5
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
bundler-cache: true
- name: Cache modules
id: modules
uses: actions/cache@v4
with:
path: modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}
- name: Install modules
if: steps.modules.outputs.cache-hit != 'true'
run: bundle exec r10k puppetfile install

unit:
needs: rubocop_and_matrix
needs:
- rubocop_and_matrix
- cache_modules
name: "Unit tests ${{ matrix.ruby }} ${{ matrix.os }}"
strategy:
fail-fast: false
Expand All @@ -52,9 +74,6 @@ jobs:
with:
path: modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}
- name: Install modules
if: steps.modules.outputs.cache-hit != 'true'
run: bundle exec r10k puppetfile install
- name: Unit tests
run: bundle exec rake tests:unit

Expand All @@ -78,7 +97,9 @@ jobs:

local_transports:
name: "local transport ${{ matrix.ruby }} ${{ matrix.os }}"
needs: rubocop_and_matrix
needs:
- rubocop_and_matrix
- cache_modules
env:
BOLT_WINRM_USER: roddypiper
BOLT_WINRM_HOST: localhost
Expand All @@ -105,9 +126,6 @@ jobs:
with:
path: modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}
- name: Install modules
if: steps.modules.outputs.cache-hit != 'true'
run: bundle exec r10k puppetfile install
- if: matrix.os == 'ubuntu-24.04'
uses: ./.github/actions/sudo_setup
- if: matrix.os == 'windows-2025'
Expand All @@ -120,7 +138,9 @@ jobs:
run: bundle exec rake ci:local_transport:windows

winrm_transport:
needs: rubocop_and_matrix
needs:
- rubocop_and_matrix
- cache_modules
env:
BOLT_WINRM_USER: roddypiper
BOLT_WINRM_HOST: localhost
Expand All @@ -146,9 +166,6 @@ jobs:
with:
path: modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/Puppetfile') }}
- name: Install modules
if: steps.modules.outputs.cache-hit != 'true'
run: bundle exec r10k puppetfile install
- name: Configure WinRM and use Puppet's Ruby
shell: powershell
run: |
Expand All @@ -159,6 +176,7 @@ jobs:
tests:
needs:
- rubocop_and_matrix
- cache_modules
- unit
- run-dita
- local_transports
Expand Down
Loading