CI: update module cache in central job #159
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Apply | |
| on: | |
| pull_request: {} | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| env: | |
| BOLT_WINRM_USER: roddypiper | |
| BOLT_WINRM_HOST: localhost | |
| BOLT_WINRM_PORT: 5985 | |
| BOLT_WINRM_SSL_PORT: 5986 | |
| BOLT_WINRM_SMB_PORT: 445 | |
| jobs: | |
| tests: | |
| name: Tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04, windows-latest] | |
| ruby: [3.2] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| 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 | |
| - if: matrix.os == 'ubuntu-22.04' | |
| uses: ./.github/actions/sudo_setup | |
| - if: matrix.os == 'windows-latest' | |
| uses: ./.github/actions/windows_agent_setup | |
| - if: matrix.os == 'ubuntu-22.04' | |
| name: Run tests | |
| run: bundle exec rake ci:apply:linux | |
| - if: matrix.os == 'windows-latest' | |
| name: Run tests | |
| run: bundle exec rake ci:apply:windows |