Skip to content

Use system Puppet in CI #10

Use system Puppet in CI

Use system Puppet in CI #10

Workflow file for this run

---
name: Test
on:
pull_request:
push:
branches:
- 'develop'
- '*-stable'
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true
jobs:
rubocop:
name: Rubocop
uses: theforeman/actions/.github/workflows/rubocop.yml@v0
test:
name: "Ruby ${{ matrix.ruby }} / Puppet ${{ matrix.puppet }}"
needs: rubocop
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ruby: '2.7'
puppet: '7'
- ruby: '3.0'
puppet: '7'
- ruby: '3.2'
puppet: '8'
env:
BUNDLE_WITHOUT: puppet
steps:
- uses: actions/checkout@v4
- name: Set up Puppet repositories
run: |
. /etc/os-release
wget "https://apt.puppet.com/puppet${{ matrix.puppet }}-release-${VERSION_CODENAME}.deb"
sudo apt install "${PWD}/puppet${{ matrix.puppet }}-release-${VERSION_CODENAME}.deb"
sudo apt update
- name: Install system dependencies
run: sudo apt-get install -y --no-install-recommends asciidoc puppet-agent
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Archive Gemfile.lock
uses: actions/upload-artifact@v4
with:
name: Gemfile-ruby-${{ matrix.ruby }}-puppet-${{ matrix.puppet }}.lock
path: Gemfile.lock
- name: Run tests
run: bundle exec rake spec
- name: Test installer configuration
run: |
bundle exec rake install PREFIX=./local --trace
bundle exec rake installation_tests PREFIX=./local --trace
# A dummy job that you can mark as a required check instead of each individual test
test-suite:
needs: test
runs-on: ubuntu-latest
name: Test suite
steps:
- run: echo Test suite completed