Skip to content

Commit 1cc7567

Browse files
committed
ci: run rubocop
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent 9515740 commit 1cc7567

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/ruby.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ concurrency:
1919
cancel-in-progress: true
2020

2121
env:
22+
RUBY_VERSION_DEFAULT: '4.0' # see https://www.ruby-lang.org/en/downloads/releases/
2223
COVERAGE_DIR: coverage
2324
TESTS_COVERAGE_ARTIFACT: coverage
2425

@@ -86,3 +87,28 @@ jobs:
8687
with:
8788
project-token: ${{ env.CODACY_PROJECT_TOKEN }}
8889
coverage-reports: '${{ env.TESTS_COVERAGE_ARTIFACT }}_*/coverage.xml'
90+
rubocop:
91+
name: RuboCop
92+
runs-on: ubuntu-latest
93+
timeout-minutes: 10
94+
steps:
95+
- name: Checkout Code
96+
# see https://github.com/actions/checkout
97+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
98+
with:
99+
persist-credentials: false
100+
- name: Set up Ruby
101+
# see https://github.com/ruby/setup-ruby
102+
uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0
103+
with:
104+
ruby-version: ${{ env.RUBY_VERSION_DEFAULT }}
105+
# intentionally disabled to avoid cache poisoning risks flagged by zizmor
106+
bundler-cache: false
107+
- name: Install Dependencies
108+
run: bundle install
109+
- name: Run RuboCop
110+
# see https://rubocop.org/
111+
run: >
112+
bundle exec rubocop
113+
--format simple
114+
--format github

0 commit comments

Comments
 (0)