Skip to content

Commit 1e4ab68

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

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/pdk-basic.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
9+
10+
env:
11+
GITHUB_USER: ${{ secrets.PUPPET_REPO_USER }}
12+
GITHUB_TOKEN: ${{ secrets.PUPPET_REPO_USER_TOKEN }}
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
# This workflow contains a single job called "build"
17+
validate:
18+
# The type of runner that the job will run on
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
puppet-version: [5, 6, 7]
23+
container: puppet/puppet-dev-tools:2022-03-28-92c7176
24+
25+
# Steps represent a sequence of tasks that will be executed as part of the job
26+
steps:
27+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
28+
- uses: actions/checkout@v2
29+
30+
- name: action-pdk-validate-puppet-${{ matrix.puppet-version }}
31+
run: pdk validate --puppet-version=${{ matrix.puppet-version }}
32+
# Runs pdk test unit
33+
34+
unit-puppet:
35+
runs-on: ubuntu-latest
36+
strategy:
37+
matrix:
38+
puppet-version: [5, 6, 7]
39+
container: puppet/puppet-dev-tools:2022-03-28-92c7176
40+
needs: validate
41+
# Steps represent a sequence of tasks that will be executed as part of the job
42+
steps:
43+
- uses: actions/checkout@v2
44+
45+
- name: action-pdk-test-unit-puppet-${{ matrix.puppet-version }}
46+
run: pdk test unit --puppet-version=${{ matrix.puppet-version }}

0 commit comments

Comments
 (0)