Skip to content

Commit 396893b

Browse files
author
Daniel Carabas
committed
Add Github Actions workflows and update README
1 parent cce0e55 commit 396893b

File tree

6 files changed

+129
-1
lines changed

6 files changed

+129
-1
lines changed

.github/workflows/release.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "release"
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release'
7+
8+
jobs:
9+
LitmusAcceptance:
10+
env:
11+
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
12+
HONEYCOMB_DATASET: litmus tests
13+
runs-on: self-hosted
14+
strategy:
15+
matrix:
16+
ruby_version: [2.5.x]
17+
puppet_gem_version: [~> 6.0]
18+
platform: [release_checks]
19+
agent_family: ['puppet5', 'puppet6']
20+
21+
steps:
22+
- uses: actions/checkout@v1
23+
- name: Litmus Parallel
24+
uses: puppetlabs/action-litmus_parallel@master
25+
with:
26+
platform: ${{ matrix.platform }}
27+
agent_family: ${{ matrix.agent_family }}
28+
Spec:
29+
runs-on: self-hosted
30+
strategy:
31+
matrix:
32+
check: [spec, 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop']
33+
ruby_version: [2.5.x]
34+
puppet_gem_version: [~> 5.0, ~> 6.0]
35+
exclude:
36+
- puppet_gem_version: ~> 5.0
37+
check: 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
38+
- ruby_version: 2.5.x
39+
puppet_gem_version: ~> 5.0
40+
steps:
41+
- uses: actions/checkout@v1
42+
- name: Spec Tests
43+
uses: puppetlabs/action-litmus_spec@master
44+
with:
45+
puppet_gem_version: ${{ matrix.puppet_gem_version }}
46+
check: ${{ matrix.check }}

.github/workflows/ubuntu16_pr.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ jobs:
1111
uses: actions/setup-ruby@v1
1212
with:
1313
ruby-version: 2.6
14+
- name: Prepare inventory file
15+
run: |
16+
cat <<EOF >> inventory.yaml
17+
---
18+
version: 2
19+
groups:
20+
- name: local
21+
targets:
22+
- uri: litmus_localhost
23+
config:
24+
transport: local
25+
- name: ssh_nodes
26+
targets: []
27+
- name: winrm_nodes
28+
targets: []
29+
EOF
1430
- name: Install gems and puppet agent
1531
run: |
1632
bundle install

.github/workflows/ubuntu18_pr.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ jobs:
1111
uses: actions/setup-ruby@v1
1212
with:
1313
ruby-version: 2.6
14+
- name: Prepare inventory file
15+
run: |
16+
cat <<EOF >> inventory.yaml
17+
---
18+
version: 2
19+
groups:
20+
- name: local
21+
targets:
22+
- uri: litmus_localhost
23+
config:
24+
transport: local
25+
- name: ssh_nodes
26+
targets: []
27+
- name: winrm_nodes
28+
targets: []
29+
EOF
1430
- name: Install gems and puppet agent
1531
run: |
1632
bundle install

.github/workflows/weekly.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "weekly"
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 6'
6+
7+
jobs:
8+
LitmusAcceptance:
9+
env:
10+
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
11+
HONEYCOMB_DATASET: litmus tests
12+
runs-on: self-hosted
13+
strategy:
14+
matrix:
15+
ruby_version: [2.5.x]
16+
puppet_gem_version: [~> 6.0]
17+
platform: [release_checks]
18+
agent_family: ['puppet5', 'puppet6']
19+
20+
steps:
21+
- uses: actions/checkout@v1
22+
- name: Litmus Parallel
23+
uses: puppetlabs/action-litmus_parallel@master
24+
with:
25+
platform: ${{ matrix.platform }}
26+
agent_family: ${{ matrix.agent_family }}
27+
Spec:
28+
runs-on: self-hosted
29+
strategy:
30+
matrix:
31+
check: [spec, 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop']
32+
ruby_version: [2.5.x]
33+
puppet_gem_version: [~> 5.0, ~> 6.0]
34+
exclude:
35+
- puppet_gem_version: ~> 5.0
36+
check: 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
37+
- ruby_version: 2.5.x
38+
puppet_gem_version: ~> 5.0
39+
steps:
40+
- uses: actions/checkout@v1
41+
- name: Spec Tests
42+
uses: puppetlabs/action-litmus_spec@master
43+
with:
44+
puppet_gem_version: ${{ matrix.puppet_gem_version }}
45+
check: ${{ matrix.check }}

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@
2424
.DS_Store
2525
.project
2626
.envrc
27-
inventory.yaml

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
4. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
2828
5. [Limitations - OS compatibility, etc.](#limitations)
2929
6. [Development - Guide for contributing to the module](#development)
30+
7. [Acceptance](#acceptance)
3031

3132

3233
## Description
@@ -1012,3 +1013,8 @@ This module supports:
10121013
## Development
10131014

10141015
If you would like to contribute to this module, see the guidelines in [CONTRIBUTING.MD](https://github.com/puppetlabs/puppetlabs-docker/blob/master/CONTRIBUTING.md).
1016+
1017+
## Acceptance
1018+
1019+
Acceptance tests for this module leverage [puppet_litmus](https://github.com/puppetlabs/puppet_litmus).
1020+
To run the acceptance tests follow the instructions [here](https://github.com/puppetlabs/puppet_litmus/wiki/Tutorial:-use-Litmus-to-execute-acceptance-tests-with-a-sample-module-(MoTD)#install-the-necessary-gems-for-the-module).

0 commit comments

Comments
 (0)