-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 1.74 KB
/
pr-checks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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'