Skip to content

Commit

Permalink
Adds dynamic matrix for puppet metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
logicminds committed Apr 28, 2022
1 parent 0872d40 commit c0ce802
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/pdk-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,30 @@ on:
jobs:
validate:
runs-on: ubuntu-latest
strategy:
matrix:
puppet-version: [7]
container: ${{ inputs.container_image }}

outputs:
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }}
steps:
- uses: actions/checkout@v2
- name: action-pdk-validate-puppet-${{ matrix.puppet-version }}
run: pdk validate --puppet-version=${{ matrix.puppet-version }}
- name: action-pdk-validate-puppet-7
run: pdk validate --puppet-version=7
- name: Setup Test Matrix
id: get-outputs
run: gem install puppet_metadata -N && metadata2gha --use-fqdn


unit-puppet:
needs:
- validate
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
puppet-version: [5, 6, 7]
include: ${{fromJson(needs.validate.outputs.puppet_unit_test_matrix)}}
container: ${{ inputs.container_image }}
needs: validate
steps:
- uses: actions/checkout@v2

- name: action-pdk-test-unit-puppet-${{ matrix.puppet-version }}
run: pdk test unit --puppet-version=${{ matrix.puppet-version }}
- name: action-pdk-test-unit-puppet-${{ matrix.puppet }}
run: pdk test unit --puppet-version=${{ matrix.puppet }}

0 comments on commit c0ce802

Please sign in to comment.