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 May 6, 2022
1 parent 0872d40 commit 501029c
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 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
- run: gem install puppet_metadata --no-document
- name: Setup Test Matrix
id: get-outputs
run: 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 501029c

Please sign in to comment.