-
-
Notifications
You must be signed in to change notification settings - Fork 81
127 lines (103 loc) · 3.02 KB
/
test-suite.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Test suite
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-static-current:
strategy:
fail-fast: false
matrix:
puppet: [7.22.0]
ruby: [2.7.7, 3.0.5, 3.1.3]
name: Static code analysis new
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
env:
PUPPET_VERSION: ${{ matrix.puppet }}
- name: Run metadata lint
run: |
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake metadata_lint
- name: Run puppet lint
run: |
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake lint
- name: Run puppet syntax check
run: |
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake syntax
- name: Run puppet rspec tests
run: |
PUPPET_VERSION=${{ matrix.puppet }} STRICT_VARIABLES=yes bundle exec rake spec
- name: Run rubocop tests
run: |
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake rubocop
test-static-old:
strategy:
fail-fast: false
matrix:
puppet: [5.5.22, 6.29.0]
ruby: [2.7.7, 3.0.5, 3.1.3]
name: Static code analysis old
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
env:
PUPPET_VERSION: ${{ matrix.puppet }}
- name: Run metadata lint
run: |
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake metadata_lint
- name: Run puppet lint
run: |
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake lint
- name: Run puppet syntax check
run: |
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake syntax
- name: Run puppet rspec tests
run: |
PUPPET_VERSION=${{ matrix.puppet }} STRICT_VARIABLES=yes bundle exec rake spec
- name: Run rubocop tests
run: |
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake rubocop
test-integration:
strategy:
fail-fast: false
matrix:
puppet: [puppet6, puppet7]
beakerset: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, centos-7, debian-10, debian-11]
name: Integration tests
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
env:
BEAKER_set: ${{ matrix.beakerset }}
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet }}
PUPPET_INSTALL_TYPE: agent
- name: Run puppet-beaker tests
run: |
BEAKER_destroy=yes bundle exec rake acceptance
env:
BEAKER_set: ${{ matrix.beakerset }}
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet }}
PUPPET_INSTALL_TYPE: agent