-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from voxpupuli/updates
Apply Vox Pupuli CI + RuboCop defaults
- Loading branch information
Showing
12 changed files
with
150 additions
and
275 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,17 @@ | ||
version: 2 | ||
updates: | ||
# raise PRs for gem updates | ||
- package-ecosystem: bundler | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "13:00" | ||
open-pull-requests-limit: 10 | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "13:00" | ||
open-pull-requests-limit: 10 |
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,32 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'voxpupuli' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Ruby 3.3 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.3' | ||
env: | ||
BUNDLE_WITHOUT: release | ||
- name: Build gem | ||
run: gem build --strict --verbose *.gemspec | ||
- name: Publish gem to rubygems.org | ||
run: gem push *.gem | ||
env: | ||
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}' | ||
- name: Setup GitHub packages access | ||
run: | | ||
mkdir -p ~/.gem | ||
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials | ||
chmod 0600 ~/.gem/credentials | ||
- name: Publish gem to GitHub packages | ||
run: gem push --key github --host https://rubygems.pkg.github.com/voxpupuli *.gem |
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 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: {} | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
BUNDLE_WITHOUT: release | ||
|
||
jobs: | ||
rubocop_and_matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
ruby: ${{ steps.ruby.outputs.versions }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Ruby 3.3 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.3' | ||
bundler-cache: true | ||
- name: Run RuboCop | ||
run: bundle exec rake rubocop | ||
- id: ruby | ||
uses: voxpupuli/ruby-version@v1 | ||
|
||
test: | ||
name: "Ruby ${{ matrix.ruby }}" | ||
runs-on: ubuntu-latest | ||
needs: rubocop_and_matrix | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Run tests | ||
run: bundle exec rake | ||
- name: Build the gem | ||
run: gem build --strict --verbose *.gemspec | ||
|
||
tests: | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.bundle | ||
.vendor | ||
vendor | ||
Gemfile.lock |
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,5 @@ | ||
--- | ||
inherit_from: .rubocop_todo.yml | ||
|
||
inherit_gem: | ||
voxpupuli-rubocop: rubocop.yml |
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,32 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2025-02-06 09:54:26 UTC using RuboCop version 1.67.0. | ||
# 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: 2 | ||
# Configuration parameters: Prefixes, AllowedPatterns. | ||
# Prefixes: when, with, without | ||
RSpec/ContextWording: | ||
Exclude: | ||
- 'spec/puppet-lint/plugins/check_exec_idempotency/check_exec_idempotency_spec.rb' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: IgnoredMetadata. | ||
RSpec/DescribeClass: | ||
Exclude: | ||
- '**/spec/features/**/*' | ||
- '**/spec/requests/**/*' | ||
- '**/spec/routing/**/*' | ||
- '**/spec/system/**/*' | ||
- '**/spec/views/**/*' | ||
- 'spec/puppet-lint/plugins/check_exec_idempotency/check_exec_idempotency_spec.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. | ||
# URISchemes: http, https | ||
Layout/LineLength: | ||
Max: 148 |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.