diff --git a/.github/workflows/pdk-basic.yml b/.github/workflows/pdk-basic.yml new file mode 100644 index 0000000..ab24aa2 --- /dev/null +++ b/.github/workflows/pdk-basic.yml @@ -0,0 +1,46 @@ +# This is a basic workflow to help you get started with Actions + +name: PDK basic + +# Controls when the workflow will run +on: + workflow_call: + + +env: + GITHUB_USER: ${{ secrets.PUPPET_REPO_USER }} + GITHUB_TOKEN: ${{ secrets.PUPPET_REPO_USER_TOKEN }} + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + validate: + # The type of runner that the job will run on + runs-on: ubuntu-latest + strategy: + matrix: + puppet-version: [5, 6, 7] + container: puppet/puppet-dev-tools:2022-03-28-92c7176 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: action-pdk-validate-puppet-${{ matrix.puppet-version }} + run: pdk validate --puppet-version=${{ matrix.puppet-version }} + # Runs pdk test unit + + unit-puppet: + runs-on: ubuntu-latest + strategy: + matrix: + puppet-version: [5, 6, 7] + container: puppet/puppet-dev-tools:2022-03-28-92c7176 + needs: validate + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: actions/checkout@v2 + + - name: action-pdk-test-unit-puppet-${{ matrix.puppet-version }} + run: pdk test unit --puppet-version=${{ matrix.puppet-version }}