-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/develop' into hdm
- Loading branch information
Showing
70 changed files
with
712 additions
and
167 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,9 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,69 @@ | ||
--- | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'develop' | ||
- '*-stable' | ||
|
||
concurrency: | ||
group: ${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
rubocop: | ||
name: Rubocop | ||
uses: theforeman/actions/.github/workflows/rubocop.yml@v0 | ||
|
||
test: | ||
name: "Ruby ${{ matrix.ruby }} / Puppet ${{ matrix.puppet }}" | ||
needs: rubocop | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- ruby: '2.7' | ||
puppet: '7.0' | ||
- ruby: '3.0' | ||
puppet: '7.0' | ||
- ruby: '3.2' | ||
puppet: '8.0' | ||
env: | ||
PUPPET_VERSION: ${{ matrix.puppet }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install system dependencies | ||
run: sudo apt-get install -y --no-install-recommends asciidoc | ||
- name: Setup ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Archive Gemfile.lock | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Gemfile-ruby-${{ matrix.ruby }}-puppet-${{ matrix.puppet }}.lock | ||
path: Gemfile.lock | ||
- name: Run tests | ||
run: bundle exec rake spec | ||
- name: Test installer configuration | ||
run: | | ||
bundle exec rake install PREFIX=./local --trace | ||
bundle exec rake installation_tests PREFIX=./local --trace | ||
- name: Archive Puppetfile.lock | ||
if: ${{ !cancelled() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Puppetfile-ruby-${{ matrix.ruby }}-puppet-${{ matrix.puppet }}.lock | ||
path: Puppetfile.lock | ||
|
||
# A dummy job that you can mark as a required check instead of each individual test | ||
test-suite: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
name: Test suite | ||
steps: | ||
- run: echo Test suite completed |
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
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,55 @@ | ||
--- | ||
stages: | ||
- lint | ||
- test | ||
- installation-tests | ||
|
||
variables: | ||
RUBY_VERSION: "2.7" | ||
RUBY_IMAGE: "ruby:${RUBY_VERSION}" | ||
PUPPET_VERSION: "7.0" | ||
|
||
.common: | ||
image: ${RUBY_IMAGE} | ||
cache: | ||
key: $CI_COMMIT_REF_SLUG | ||
paths: | ||
- vendor/ruby | ||
before_script: | ||
- bundle config set --local path 'vendor/ruby' | ||
- bundle install -j $(nproc) | ||
|
||
lint: | ||
extends: .common | ||
stage: lint | ||
script: | ||
- bundle exec rubocop --format junit --out rubocop.xml --display-only-fail-level-offenses --fail-level=A | ||
artifacts: | ||
when: always | ||
paths: | ||
- rubocop.xml | ||
reports: | ||
junit: rubocop.xml | ||
|
||
test: | ||
extends: .common | ||
stage: test | ||
script: | ||
- bundle exec rspec --format RspecJunitFormatter --out rspec.xml | ||
artifacts: | ||
when: always | ||
paths: | ||
- rspec.xml | ||
reports: | ||
junit: rspec.xml | ||
|
||
installation-tests: | ||
extends: .common | ||
stage: installation-tests | ||
variables: | ||
PREFIX: "${RUBY_VERSION}" | ||
script: | ||
- apt update && apt install -y asciidoc-base docbook-xsl --no-install-recommends | ||
- bundle exec rake install --trace | ||
- bundle exec rake installation_tests --trace | ||
... |
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
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
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 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2024-04-12 16:14:26 +0530 using RuboCop version 0.80.1. | ||
# The point is for the user to remove these configuration records | ||
# one by one as the offenses are removed from the code base. | ||
# Note that changes in the inspected code, or installation of new | ||
# versions of RuboCop, may require this file to be generated again. | ||
|
||
# Offense count: 1 | ||
# Cop supports --auto-correct. | ||
Lint/RedundantCopDisableDirective: | ||
Exclude: | ||
- 'hooks/boot/05-environment.rb' | ||
|
||
# Offense count: 1 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: both, prefix, postfix | ||
Style/NegatedIf: | ||
Exclude: | ||
- 'hooks/pre_validations/01-reset_data.rb' |
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
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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
3.10.0-develop | ||
3.12.0-develop |
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
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
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
Oops, something went wrong.