Skip to content

Commit

Permalink
Adds basic workflow for pdk based modules
Browse files Browse the repository at this point in the history
  • Loading branch information
logicminds committed Apr 20, 2022
1 parent 238b8d0 commit 1254451
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/pdk-basic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This is a basic workflow to help you get started with Actions

name: PDK basic

# Controls when the workflow will run
on:
workflow_call:
inputs:
container_image:
description: Image to use when running tests
default: 'puppet/puppet-dev-tools:2022-03-28-92c7176'
required: false
type: string


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: ${{ inputs.container_image }}

# 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: ${{ inputs.container_image }}
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 }}

0 comments on commit 1254451

Please sign in to comment.