-
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 #105 from SUSE/update_github_actions
Update GitHub actions and default rubocop configuration
- Loading branch information
Showing
7 changed files
with
68 additions
and
2 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,26 @@ | ||
name: Check if the gem exists on rubygems.org | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build-gem: | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
|
||
strategy: | ||
matrix: | ||
ruby-version: ['2.5', '2.7'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby ${{ matrix.ruby-version }} | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
- name: Check if gem exists | ||
run: | | ||
GEM_VERSION=$(ruby -e "require 'scc/codestyle'; print Scc::Codestyle::VERSION" -I lib) | ||
# if we install the gem, then the $GEM_VERSION already exist on rubygems.org | ||
# therefore error | ||
gem install -q --silent scc-codestyle -v $GEM_VERSION && (touch failed-install && exit 0) || exit 0 | ||
test -f failed-install && (echo "bump the gem version!" && exit 1) |
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,20 @@ | ||
name: Rubocop | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
rubocop: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7.6 | ||
|
||
|
||
- name: Run rubocop | ||
run: | | ||
bundle install | ||
bundle exec rubocop |
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,6 +1,9 @@ | ||
inherit_from: | ||
- .rubocop_todo.yml | ||
- default.yml | ||
|
||
|
||
|
||
Naming/FileName: | ||
inherit_mode: | ||
merge: | ||
|
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,14 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2022-07-22 12:23:32 UTC using RuboCop version 1.31.2. | ||
# 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 | ||
# Configuration parameters: Include. | ||
# Include: **/*.gemspec | ||
Gemspec/RequiredRubyVersion: | ||
Exclude: | ||
- 'scc-codestyle.gemspec' |
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,5 +1,5 @@ | ||
module Scc | ||
module Codestyle | ||
VERSION = '0.6.1'.freeze | ||
VERSION = '0.6.2'.freeze | ||
end | ||
end |