-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds basic workflow for pdk based modules
- Loading branch information
1 parent
238b8d0
commit 1254451
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |