diff --git a/.github/config/rubocop_linter_action.yml b/.github/config/rubocop_linter_action.yml new file mode 100644 index 0000000..ae36bcf --- /dev/null +++ b/.github/config/rubocop_linter_action.yml @@ -0,0 +1,5 @@ +rubocop_fail_level: "fatal" + +versions: + - rubocop + - rubocop-rspec diff --git a/.github/workflows/rubocop_linter.yml b/.github/workflows/rubocop_linter.yml new file mode 100644 index 0000000..71363d1 --- /dev/null +++ b/.github/workflows/rubocop_linter.yml @@ -0,0 +1,15 @@ +name: RuboCop linter + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v1 + + - name: RuboCop linter + uses: andrewmcodes/rubocop-linter-action@v3.3.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 01c2de3..7064093 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![Build Status](https://github.com/SciRuby/ruby-sparse/workflows/Ruby-Sparse%20test/badge.svg?branch=master)](https://github.com/SciRuby/ruby-sparse/actions?query=workflow%3A%22Ruby-Sparse+test%22) +[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop-hq/rubocop) + Ruby Library for Sparse Tensors. ## Installation @@ -30,4 +32,4 @@ rake pry ## LICENSE -This software is distributed under the [BSD 3-Clause License](LICENSE). \ No newline at end of file +This software is distributed under the [BSD 3-Clause License](LICENSE).