Skip to content

Commit

Permalink
Limit to known-good setups from acceptance tests
Browse files Browse the repository at this point in the history
For acceptance testing, we look into metadata.json for supported versions
of Puppet and operating systems, and for each combination try to execute
the acceptance test suites.

However, some combination depend on nonexistent packages, typically for a
recent version of Puppet on an old Linux distribution, or with an old
version of Puppet on a recent Linux distribution.

Instead of letting GitHub compute all possible matrix combinations, rely
on puppet_metadata to build the list of supported combinations.
  • Loading branch information
smortex committed Aug 5, 2021
1 parent 8f1a9fd commit e3c6c4c
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions moduleroot/.github/workflows/ci.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: <%= @configs['timeout_minutes'] %>
outputs:
beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }}
puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }}
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }}
env:
BUNDLE_WITHOUT: development:system_tests:release
steps:
Expand Down Expand Up @@ -63,16 +62,36 @@ jobs:
strategy:
fail-fast: false
matrix:
setfile: ${{fromJson(needs.setup_matrix.outputs.beaker_setfiles)}}
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
include: ${{fromJson(needs.setup_matrix.outputs.github_action_test_matrix)}}
<%- @configs['beaker_fact_matrix'].each do |option, values| -%>
<%= option %>:
<%- values.each do |value| -%>
- "<%= value %>"
<%- end -%>
<%- end -%>
<%- if @configs['excludes'].any? -%>
exclude:
- setfile:
name: "Debian 8"
value: "debian8-64{hostname=debian8-64.example.com}"
puppet:
name: "Puppet 7"
value: 7
collection: "puppet7"
- setfile:
name: "Ubuntu 14.04"
value: "ubuntu1404-64{hostname=ubuntu1404-64.example.com}"
puppet:
name: "Puppet 7"
value: 7
collection: "puppet7"
- setfile:
name: "Ubuntu 20.04"
value: "ubuntu2004-64{hostname=ubuntu2004-64.example.com}"
puppet:
name: "Puppet 5"
value: 5
collection: "puppet5"
<%- if @configs['excludes'].any? -%>
<%- @configs['excludes'].each do |exclude| -%>
<%- exclude.each do |key, value| -%>
<%= key == exclude.first.first ? '-' : ' ' %> <%= key %>: "<%= value %>"
Expand Down

0 comments on commit e3c6c4c

Please sign in to comment.