Skip to content

Commit

Permalink
Merge pull request #176 from djjudas21/add_test_github_test_workflow
Browse files Browse the repository at this point in the history
Add github workflow to run PDK tests and deploy to puppet forge.
  • Loading branch information
nward authored Apr 11, 2022
2 parents c0576f3 + e092b32 commit e5e9a29
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 9 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and publish to Puppet Forge

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get latest tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF:10}
- name: Clone repository
uses: actions/checkout@v2
with:
ref: ${{ steps.vars.outputs.tag }}
- name: Build and publish module
uses: barnumbirr/[email protected]
env:
FORGE_API_KEY: ${{ secrets.FORGE_API_KEY }}
REPOSITORY_URL: https://forgeapi.puppet.com/v3/releases
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Run PDK tests

on:
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Run unit tests
uses: puppets-epic-show-theatre/action-pdk-test-unit@v1
with:
puppet-version: ""
# [optional]
# A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".
pe-version: ""
# [optional]
# A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1".
validate:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Run PDK validate
uses: puppets-epic-show-theatre/action-pdk-validate@v1
with:
puppet-version: ""
# [optional]
# A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".
pe-version: ""
# [optional]
# A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1".
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Changelog

### 3.9.2
* Bugfix: Restart FreeRADIUS after any huntgroups modification

### 3.9.1
* Various bugfixes in parameter type validation (thanks @craigwatson and @amateo)

Expand Down
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Contributing

This module was written primarily for internal use - features we haven't needed to
use probably haven't been written. Please send pull requests with new features and
bug fixes. You are also welcome to file issues but I make no guarantees of
development effort if the features aren't useful to my employer.

This module uses Github Actions for testing and validation. Any contributions
must pass tests cleanly, so please ensure you update the tests to match your
contribution.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
* [`freeradius::template`](#freeradiustemplate)
* [`freeradius::virtual_module`](#freeradiusvirtual_module)
4. [Limitations - OS compatibility, etc.](#limitations)
5. [Development - Guide for contributing to the module](#development)

## Overview

Expand Down Expand Up @@ -1625,10 +1624,3 @@ might work. Likely sticking points with other distros are the names of packages,
services and file paths.

This module requires Puppet 4 or greater.

## Development

This module was written primarily for internal use - features we haven't needed to
use probably haven't been written. Please send pull requests with new features and
bug fixes. You are also welcome to file issues but I make no guarantees of
development effort if the features aren't useful to my employer.
2 changes: 1 addition & 1 deletion spec/defines/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
context 'with password' do
let(:params) do
super().merge(
password: "foo bar",
password: 'foo bar',
)
end

Expand Down

0 comments on commit e5e9a29

Please sign in to comment.