From 1e4ab682b0249b7a7cf93a1a8b50bcf5fb97e849 Mon Sep 17 00:00:00 2001 From: Corey Osman Date: Wed, 20 Apr 2022 13:35:19 -0700 Subject: [PATCH] Adds basic workflow for pdk based modules --- .github/workflows/pdk-basic.yml | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/pdk-basic.yml 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 }}