Skip to content

Commit

Permalink
ci: add rubocop workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshoku committed Jan 26, 2024
1 parent c94237f commit 480d49d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: lint

on:
push:
branches:
- main
- dev*
pull_request:

jobs:
rubocop:
runs-on: ubuntu-latest
name: RuboCop
steps:
- uses: actions/checkout@v4
- name: Set up Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Run RuboCop
run: bundle exec rubocop
6 changes: 1 addition & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ Rake::TestTask.new(:test) do |t|
t.test_files = FileList['test/**/test_*.rb']
end

require 'rubocop/rake_task'

RuboCop::RakeTask.new

require 'rake/extensiontask'

task build: :compile # rubocop:disable Rake/Desc
Expand All @@ -27,4 +23,4 @@ Rake::ExtensionTask.new('tiny_linalg') do |ext|
ext.lib_dir = 'lib/numo/tiny_linalg'
end

task default: %i[clobber compile test rubocop]
task default: %i[clobber compile test]

0 comments on commit 480d49d

Please sign in to comment.