Skip to content

Commit 1254451

Browse files
committed
Adds basic workflow for pdk based modules
1 parent 238b8d0 commit 1254451

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/pdk-basic.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: PDK basic
4+
5+
# Controls when the workflow will run
6+
on:
7+
workflow_call:
8+
inputs:
9+
container_image:
10+
description: Image to use when running tests
11+
default: 'puppet/puppet-dev-tools:2022-03-28-92c7176'
12+
required: false
13+
type: string
14+
15+
16+
env:
17+
GITHUB_USER: ${{ secrets.PUPPET_REPO_USER }}
18+
GITHUB_TOKEN: ${{ secrets.PUPPET_REPO_USER_TOKEN }}
19+
20+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
21+
jobs:
22+
# This workflow contains a single job called "build"
23+
validate:
24+
# The type of runner that the job will run on
25+
runs-on: ubuntu-latest
26+
strategy:
27+
matrix:
28+
puppet-version: [5, 6, 7]
29+
container: ${{ inputs.container_image }}
30+
31+
# Steps represent a sequence of tasks that will be executed as part of the job
32+
steps:
33+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
34+
- uses: actions/checkout@v2
35+
36+
- name: action-pdk-validate-puppet-${{ matrix.puppet-version }}
37+
run: pdk validate --puppet-version=${{ matrix.puppet-version }}
38+
# Runs pdk test unit
39+
40+
unit-puppet:
41+
runs-on: ubuntu-latest
42+
strategy:
43+
matrix:
44+
puppet-version: [5, 6, 7]
45+
container: ${{ inputs.container_image }}
46+
needs: validate
47+
# Steps represent a sequence of tasks that will be executed as part of the job
48+
steps:
49+
- uses: actions/checkout@v2
50+
51+
- name: action-pdk-test-unit-puppet-${{ matrix.puppet-version }}
52+
run: pdk test unit --puppet-version=${{ matrix.puppet-version }}

0 commit comments

Comments
 (0)