-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added GitHub Actions for status checks.
- Loading branch information
1 parent
0eeb469
commit 29e10f7
Showing
3 changed files
with
111 additions
and
0 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,43 @@ | ||
# .github/config/rubocop_linter_action.yml | ||
|
||
# Description: The name of the check that will be created. | ||
# Valid Options: A reasonably sized string. | ||
# Default: 'RuboCop Action' | ||
check_name: 'RuboCop Results' | ||
|
||
# Description: Versions required to run your RuboCop checks. | ||
# Valid options: RuboCop and any RuboCop extension, by default the latest gem version will be used. You can explicitly state that | ||
# (not required) or use a version number, like '1.5.1'. | ||
# Default: | ||
# versions: | ||
# - rubocop: 'latest' | ||
versions: | ||
- rubocop: 'latest' | ||
- rubocop-rake: 'latest' | ||
- rubocop-rspec: 'latest' | ||
|
||
# Description: RuboCop configuration file path relative to the workspace. | ||
# Valid options: A valid file path inside of the workspace. | ||
# Default: nil | ||
# Note: This does not need to be filled out for RuboCop to still find your config. | ||
# Resource: https://rubocop.readthedocs.io/en/stable/configuration/ | ||
rubocop_config_path: '.rubocop.yml' | ||
|
||
# Whether or not to use --force-exclusion when building the rubocop command. Use this if you are only linting modified | ||
# files and typically excluded files have been changed. For example, if you exclude db/schema.rb in your rubocop.yml | ||
# but a change gets made, then with the check_scope config set to 'modified' rubocop will lint db/schema.rb. If you set | ||
# this to true, rubocop will ignore it. | ||
# Valid options: true || false | ||
# Default: false | ||
rubocop_force_exclusion: true | ||
|
||
# The scope of code that RuboCop should lint. Use this if you only want to lint changed files. If this is not set | ||
# or not equal to 'modified', RuboCop is run against the entire codebase. Note that this will not work on the master branch. | ||
# Valid options: 'modified' | ||
# Default: nil | ||
check_scope: 'modified' | ||
|
||
# The base branch against which changes will be compared, if check_scope config is set to 'modified'. | ||
# This setting is not used if check_scope != 'modified'. | ||
# Valid options: 'origin/another_branch' | ||
base_branch: 'origin/main' |
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,33 @@ | ||
name: Branch Checks | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: git fetch origin main --depth=1 | ||
- name: RuboCop Linter | ||
uses: andrewmcodes/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
spec: | ||
runs-on: ubuntu-latest | ||
env: | ||
COVERAGE: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
# runs 'bundle install' and caches installed gems automatically | ||
bundler-cache: true | ||
- name: Run tests | ||
run: bundle exec rspec |
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,35 @@ | ||
name: Main Checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- run: git fetch origin main --depth=1 | ||
- name: RuboCop Linter | ||
uses: andrewmcodes/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
spec: | ||
runs-on: ubuntu-latest | ||
env: | ||
COVERAGE: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
# runs 'bundle install' and caches installed gems automatically | ||
bundler-cache: true | ||
- name: Run tests | ||
run: bundle exec rspec |