-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up files distributed by puppetsync for various linters. Also fix a quoting issue in create-github-release action.
- Loading branch information
Showing
12 changed files
with
1,160 additions
and
195 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# ------------------------------------------------------------------------------ | ||
# NOTICE: **This file is maintained with puppetsync** | ||
# | ||
# This file is automatically updated as part of a puppet module baseline. | ||
# The next baseline sync will overwrite any local changes made to this file. | ||
# ------------------------------------------------------------------------------ | ||
*.erb eol=lf | ||
*.pp eol=lf | ||
*.sh eol=lf | ||
*.epp eol=lf | ||
*.rb eol=lf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
name: Add new issues to triage project | ||
|
||
'on': | ||
issues: | ||
types: | ||
- opened | ||
- reopened | ||
pull_request_target: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
add-to-project: | ||
name: Add issue to project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/add-to-project@v0.5.0 | ||
with: | ||
project-url: https://github.com/orgs/simp/projects/11 | ||
github-token: ${{ secrets.AUTO_TRIAGE_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
# Run Puppet checks and test matrix on Pull Requests | ||
# ------------------------------------------------------------------------------ | ||
# NOTICE: **This file is maintained with puppetsync** | ||
# | ||
# This file is updated automatically as part of a puppet module baseline. | ||
# | ||
# The next baseline sync will overwrite any local changes to this file! | ||
# | ||
# ============================================================================== | ||
# | ||
# The testing matrix considers ruby/puppet versions supported by SIMP and PE: | ||
# ------------------------------------------------------------------------------ | ||
# Release Puppet Ruby EOL | ||
# PE 2021.Y 7.x 2.7 2025-02 (LTS) | ||
# PE 2023.Y 8.x 3.2 Biannual updates | ||
# | ||
# https://puppet.com/docs/pe/latest/component_versions_in_recent_pe_releases.html | ||
# https://puppet.com/misc/puppet-enterprise-lifecycle | ||
# ============================================================================== | ||
# | ||
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows | ||
# | ||
--- | ||
name: PR Tests | ||
'on': | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
env: | ||
PUPPET_VERSION: '~> 8' | ||
|
||
jobs: | ||
puppet-syntax: | ||
name: 'Puppet Syntax' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: "Install Ruby ${{matrix.puppet.ruby_version}}" | ||
uses: ruby/setup-ruby@v1 # ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
- run: "bundle exec rake syntax" | ||
|
||
puppet-style: | ||
name: 'Puppet Style' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: "Install Ruby ${{matrix.puppet.ruby_version}}" | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
- run: "bundle exec rake lint" | ||
- run: "bundle exec rake metadata_lint" | ||
|
||
ruby-style: | ||
if: false # TODO Modules will need: rubocop in Gemfile, .rubocop.yml | ||
name: 'Ruby Style (experimental)' | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: "Install Ruby ${{matrix.puppet.ruby_version}}" | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
- run: | | ||
bundle show | ||
bundle exec rake rubocop | ||
file-checks: | ||
name: 'File checks' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 'Install Ruby 3.2' | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
- run: bundle exec rake check:dot_underscore | ||
- run: bundle exec rake check:test_file | ||
|
||
releng-checks: | ||
name: 'RELENG checks' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 'Install Ruby ${{matrix.puppet.ruby_version}}' | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
- name: 'Tags and changelogs' | ||
run: | | ||
bundle exec rake pkg:check_version | ||
bundle exec rake pkg:compare_latest_tag[,true] | ||
bundle exec rake pkg:create_tag_changelog | ||
- name: 'Test-build the Puppet module' | ||
run: 'bundle exec pdk build --force' | ||
|
||
spec-tests: | ||
name: 'Puppet Spec' | ||
needs: [puppet-syntax] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
puppet: | ||
- label: 'Puppet 7.x [SIMP 6.6/PE 2021.7]' | ||
puppet_version: '~> 7.0' | ||
ruby_version: '2.7' | ||
experimental: false | ||
- label: 'Puppet 8.x' | ||
puppet_version: '~> 8.0' | ||
ruby_version: '3.2' | ||
experimental: false | ||
fail-fast: false | ||
env: | ||
PUPPET_VERSION: ${{matrix.puppet.puppet_version}} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 'Install Ruby ${{matrix.puppet.ruby_version}}' | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{matrix.puppet.ruby_version}} | ||
bundler-cache: true | ||
- run: 'command -v rpm || if command -v apt-get; then sudo apt-get update; sudo apt-get install -y rpm; fi ||:' | ||
- run: 'bundle exec rake spec' | ||
continue-on-error: ${{matrix.puppet.experimental}} | ||
|
||
# dump_contexts: | ||
# name: 'Examine Context contents' | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Dump contexts | ||
# env: | ||
# GITHUB_CONTEXT: ${{ toJson(github) }} | ||
# run: echo "$GITHUB_CONTEXT" | ||
# |
Oops, something went wrong.