Skip to content

CI: Add matrix for running tests #11

CI: Add matrix for running tests

CI: Add matrix for running tests #11

Workflow file for this run

---
name: Test
on:
pull_request: {}
push:
branches:
- main
env:
BUNDLE_WITHOUT: release
jobs:
rubocop_and_matrix:
runs-on: ubuntu-latest
outputs:
ruby: ${{ steps.ruby.outputs.versions }}
steps:
- uses: actions/checkout@v5
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- name: Run Rubocop
run: bundle exec rake rubocop
- id: ruby
uses: voxpupuli/ruby-version@v1
test:
runs-on: ubuntu-latest
needs: rubocop_and_matrix
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
name: Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v5
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Verify gem builds
run: gem build --strict --verbose *.gemspec
foremanci:
needs: test
name: Foreman Plugin tests
strategy:
fail-fast: false
matrix:
foreman:
- develop
- 3.16-stable
- 3.15-stable
uses: theforeman/actions/.github/workflows/foreman_plugin.yml@v0
with:
plugin: foreman_openbolt
foreman_version: ${{ matrix.foreman }}
tests:
needs:
- rubocop_and_matrix
- test
- foremanci
runs-on: ubuntu-latest
name: Test suite
steps:
- run: echo Test suite completed