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
16 changes: 10 additions & 6 deletions .github/workflows/unit_tests_with_released_puppet_gem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ jobs:
include:
- puppet_version: '7'
ruby: '2.7'
puppet_forge_token: ''
- puppet_version: '8'
ruby: '3.1'
puppet_forge_token: 'YES'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, nice! This reinforces my thoughts that Gemfile.erb should allow the source for puppetcore gems to be specified directly instead of inferring it from whether a token is present. But that's for another day.


- os: 'ubuntu-latest'
os_type: 'Linux'
Expand All @@ -28,22 +30,24 @@ jobs:
os_type: 'Windows'

runs-on: ${{ matrix.os }}
env:
PUPPET_GEM_VERSION: "source:https://rubygems-puppetcore.puppet.com#~> ${{ matrix.puppet_version }}.0"
steps:
- name: Checkout current PR code
uses: actions/checkout@v4

- name: Add libcurl for ruby 2.7 on ubuntu
if: ${{ matrix.puppet_version == '7' && matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt install libcurl4-openssl-dev

- name: Install ruby version ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
env:
BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM: forge-key:${{ secrets.PUPPET_FORGE_TOKEN_PUBLIC }}

- name: List gems
run: cat Gemfile.lock
BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM: forge-key:${{ matrix.puppet_version != '7' && secrets.PUPPET_FORGE_TOKEN_PUBLIC || '' }}
PUPPET_FORGE_TOKEN: ${{ matrix.puppet_forge_token }}

- name: Run unit tests
run: bundle exec rake parallel_spec