pdk update #60
Workflow file for this run
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
name: PR checks | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- $default-branch | |
pull_request: | |
env: | |
validate_distro: jammy | |
jobs: | |
validate: | |
name: Validate | |
# This needs to match $env.validate_distro: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install pdk | |
run: | | |
wget "https://apt.puppet.com/puppet-tools-release-${validate_distro}.deb" | |
sudo dpkg -i "puppet-tools-release-${validate_distro}.deb" | |
rm "puppet-tools-release-${validate_distro}.deb" | |
sudo apt-get update | |
sudo apt-get install -y pdk | |
- run: pdk validate | |
- name: Confirm REFERENCE.md is up-to-date | |
run: | | |
pdk bundle exec puppet strings generate --format markdown | |
git add . | |
git diff --staged --color --exit-code | |
- name: Confirm PDK update does nothing | |
run: | | |
pdk update --force | |
git add . | |
git diff --staged --color --exit-code | |
test-unit: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "2.7" | |
bundler-cache: true | |
- run: bundle exec rake spec | |
test-acceptance: | |
name: Acceptance tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
image: ['litmusimage/centos:7'] | |
agent: ['puppet7', 'puppet8'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "2.7" | |
bundler-cache: true | |
- run: bundle exec rake 'litmus:provision[docker, ${{ matrix.image }}]' | |
- run: bundle exec rake 'litmus:install_agent[${{ matrix.agent }}]' | |
- run: bundle exec rake 'litmus:install_module' | |
- run: bundle exec rake 'litmus:acceptance:parallel' |