Skip to content

Commit 22d40ef

Browse files
committed
🚨 rubocop-gradual first linting + lockfile
1 parent efb01b4 commit 22d40ef

File tree

126 files changed

+16123
-5906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+16123
-5906
lines changed

‎.github/workflows/coverage.yml

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Ruby - Coverage
2+
3+
env:
4+
K_SOUP_COV_MIN_BRANCH: 71
5+
K_SOUP_COV_MIN_LINE: 89
6+
K_SOUP_COV_MIN_HARD: true
7+
8+
on:
9+
push:
10+
branches:
11+
- 'master'
12+
tags:
13+
- '!*' # Do not execute on tags
14+
pull_request:
15+
branches:
16+
- '*'
17+
# Allow manually triggering the workflow.
18+
workflow_dispatch:
19+
20+
permissions:
21+
contents: read
22+
23+
# Cancels all previous workflow runs for the same branch that have not yet completed.
24+
concurrency:
25+
# The concurrency group contains the workflow name and the branch name.
26+
group: "${{ github.workflow }}-${{ github.ref }}"
27+
cancel-in-progress: true
28+
29+
jobs:
30+
test:
31+
name: Specs with Coverage - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
32+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
33+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
34+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
35+
runs-on: ubuntu-latest
36+
strategy:
37+
matrix:
38+
rubygems:
39+
- latest
40+
bundler:
41+
- latest
42+
gemfile:
43+
- coverage
44+
ruby:
45+
- '3.1'
46+
47+
steps:
48+
- name: CodeClimate Install
49+
uses: amancevice/setup-code-climate@v2
50+
if: ${{ github.event_name != 'pull_request' }}
51+
with:
52+
cc_test_reporter_id: "${{ secrets.CC_TEST_REPORTER_ID }}"
53+
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
57+
- name: Setup Ruby & RubyGems
58+
uses: ruby/setup-ruby@v1
59+
with:
60+
ruby-version: "${{ matrix.ruby }}"
61+
rubygems: "${{ matrix.rubygems }}"
62+
bundler: "${{ matrix.bundler }}"
63+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
64+
65+
- name: CodeClimate Pre-build Notification
66+
run: cc-test-reporter before-build
67+
if: ${{ github.event_name != 'pull_request' }}
68+
continue-on-error: ${{ matrix.experimental != 'false' }}
69+
70+
- name: Run tests
71+
run: bundle exec rake test
72+
73+
- name: CodeClimate Post-build Notification
74+
run: cc-test-reporter after-build
75+
if: ${{ github.event_name != 'pull_request' }}
76+
continue-on-error: ${{ matrix.experimental != 'false' }}
77+
78+
- name: Code Coverage Summary Report
79+
uses: irongut/[email protected]
80+
if: ${{ github.event_name == 'pull_request' }}
81+
with:
82+
filename: ./coverage/coverage.xml
83+
badge: true
84+
fail_below_min: true
85+
format: markdown
86+
hide_branch_rate: false
87+
hide_complexity: true
88+
indicators: true
89+
output: both
90+
thresholds: '93 82'
91+
continue-on-error: ${{ matrix.experimental != 'false' }}
92+
93+
- name: Add Coverage PR Comment
94+
uses: marocchino/sticky-pull-request-comment@v2
95+
if: ${{ github.event_name == 'pull_request' }}
96+
with:
97+
recreate: true
98+
path: code-coverage-results.md
99+
continue-on-error: ${{ matrix.experimental != 'false' }}
100+
101+
- name: Coveralls
102+
uses: coverallsapp/github-action@master
103+
with:
104+
github-token: "${{ secrets.GITHUB_TOKEN }}"
105+
continue-on-error: ${{ matrix.experimental != 'false' }}
106+
107+
- name: Upload coverage reports to Codecov
108+
uses: codecov/[email protected]
109+
with:
110+
token: ${{ secrets.CODECOV_TOKEN }}
111+
slug: pboling/sanitize_email

‎.github/workflows/heads.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Ruby Heads Matrix
2+
3+
env:
4+
K_SOUP_COV_DO: false
5+
6+
on:
7+
push:
8+
branches:
9+
- 'main'
10+
- '*-stable'
11+
- '*-dev'
12+
tags:
13+
- '!*' # Do not execute on tags
14+
pull_request:
15+
branches:
16+
- '*'
17+
# Allow manually triggering the workflow.
18+
workflow_dispatch:
19+
20+
permissions:
21+
contents: read
22+
23+
# Cancels all previous workflow runs for the same branch that have not yet completed.
24+
concurrency:
25+
# The concurrency group contains the workflow name and the branch name.
26+
group: "${{ github.workflow }}-${{ github.ref }}"
27+
cancel-in-progress: true
28+
29+
jobs:
30+
test:
31+
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
32+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
33+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
34+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
35+
runs-on: ubuntu-latest
36+
strategy:
37+
fail-fast: true
38+
matrix:
39+
rubygems:
40+
- latest
41+
bundler:
42+
- latest
43+
gemfile:
44+
- vanilla
45+
ruby:
46+
- head
47+
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v4
51+
52+
- name: Setup Ruby & RubyGems
53+
uses: ruby/setup-ruby@v1
54+
with:
55+
ruby-version: "${{ matrix.ruby }}"
56+
rubygems: "${{ matrix.rubygems }}"
57+
bundler: "${{ matrix.bundler }}"
58+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
59+
60+
- name: Run tests
61+
run: bundle exec rake test

‎.github/workflows/style.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Ruby - Style
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
tags:
8+
- '!*' # Do not execute on tags
9+
pull_request:
10+
branches:
11+
- '*'
12+
13+
jobs:
14+
rubocop:
15+
name: RuboCop
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
rubygems:
20+
- latest
21+
bundler:
22+
- latest
23+
gemfile:
24+
- style
25+
ruby:
26+
- "3.2"
27+
runs-on: ubuntu-latest
28+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
29+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
30+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
- name: Setup Ruby & RubyGems
35+
uses: ruby/setup-ruby@v1
36+
with:
37+
ruby-version: ${{ matrix.ruby }}
38+
rubygems: ${{ matrix.rubygems }}
39+
bundler: ${{ matrix.bundler }}
40+
bundler-cache: true
41+
- name: Run RuboCop
42+
run: bundle exec rake rubocop_gradual:check

‎.rubocop.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
inherit_gem:
2+
rubocop-lts: config/rubygem.yml
3+
4+
require:
5+
- rubocop-minitest
6+
7+
Style/EmptyElse:
8+
Enabled: false

0 commit comments

Comments
 (0)