Skip to content

Commit 09d01f8

Browse files
authored
Merge pull request #1402 from Earlopain/ci-sync
CI sync with RuboCop
2 parents 8f625ad + c2a49b6 commit 09d01f8

File tree

3 files changed

+47
-30
lines changed

3 files changed

+47
-30
lines changed

.github/workflows/linting.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,41 @@
11
name: Linting
22
on:
3-
- pull_request
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
workflow_dispatch:
8+
49
concurrency:
510
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
611
cancel-in-progress: true
12+
713
jobs:
8-
yamllint:
9-
name: Yamllint
14+
lint-ruby:
15+
name: Ruby
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: ruby # Latest stable CRuby version
22+
bundler-cache: true
23+
- name: internal_investigation
24+
run: bundle exec rake internal_investigation
25+
26+
lint-yaml:
27+
permissions:
28+
contents: read # for actions/checkout to fetch code
29+
pull-requests: write # for karancode/yamllint-github-action to post comments on PRs
30+
name: Yaml
1031
runs-on: ubuntu-latest
1132
steps:
1233
- uses: actions/checkout@v4
1334
- name: Yamllint
14-
uses: karancode/yamllint-github-action@master
35+
uses: karancode/yamllint-github-action@v3.0.0
1536
with:
37+
yamllint_strict: true
38+
yamllint_format: parsable
1639
yamllint_comment: true
1740
env:
1841
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/spell_checking.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Spell Checking
22

33
on: [pull_request]
44

5+
permissions: # added using https://github.com/step-security/secure-workflows
6+
contents: read
7+
58
concurrency:
69
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
710
cancel-in-progress: true
@@ -14,6 +17,8 @@ jobs:
1417
- uses: actions/checkout@v4
1518
- uses: codespell-project/actions-codespell@v2
1619
with:
20+
check_filenames: true
21+
check_hidden: true
1722
ignore_words_file: codespell.txt
1823
misspell:
1924
name: Check spelling of all files in commit with misspell

.github/workflows/test.yml

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,59 +7,50 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10+
permissions: # added using https://github.com/step-security/secure-workflows
11+
contents: read
12+
1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1215
cancel-in-progress: true
1316

1417
jobs:
1518
main:
16-
name: Ruby ${{ matrix.ruby }}
19+
name: Spec - ${{ matrix.ruby }}
1720
runs-on: ubuntu-latest
18-
env:
19-
# See https://github.com/tmm1/test-queue#environment-variables
20-
TEST_QUEUE_WORKERS: 2
2121
strategy:
2222
fail-fast: false
2323
matrix:
2424
os: [ubuntu]
2525
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', 'head']
2626

2727
steps:
28-
- name: checkout
29-
uses: actions/checkout@v4
30-
- name: set up Ruby
31-
uses: ruby/setup-ruby@v1
28+
- uses: actions/checkout@v4
29+
- uses: ruby/setup-ruby@v1
3230
with:
3331
ruby-version: ${{ matrix.ruby }}
3432
bundler-cache: true
3533
- name: spec
3634
run: bundle exec rake spec
37-
- name: internal_investigation
38-
run: bundle exec rake internal_investigation
3935

4036
jruby:
41-
name: JRuby 9.4
37+
name: Spec - JRuby
4238
runs-on: ubuntu-latest
4339
steps:
44-
- name: checkout
45-
uses: actions/checkout@v4
46-
- name: set up Ruby
47-
uses: ruby/setup-ruby@v1
40+
- uses: actions/checkout@v4
41+
- uses: ruby/setup-ruby@v1
4842
with:
49-
ruby-version: jruby-9.4
43+
ruby-version: jruby # Latest stable JRuby version
5044
bundler-cache: true
5145
- name: spec
5246
run: bundle exec rake spec
53-
- name: internal_investigation
54-
run: bundle exec rake internal_investigation
5547

5648
prism:
5749
runs-on: ubuntu-latest
5850
name: Prism
5951
steps:
6052
- uses: actions/checkout@v4
61-
- name: set up Ruby
62-
uses: ruby/setup-ruby@v1
53+
- uses: ruby/setup-ruby@v1
6354
with:
6455
# Specify the minimum Ruby version 2.7 required for Prism to run.
6556
ruby-version: 2.7
@@ -74,12 +65,11 @@ jobs:
7465
name: Check documentation syntax
7566
steps:
7667
- uses: actions/checkout@v4
77-
- name: set up Ruby
78-
uses: ruby/setup-ruby@v1
68+
- uses: ruby/setup-ruby@v1
7969
with:
80-
ruby-version: 3.2
70+
ruby-version: ruby # Latest stable CRuby version
8171
bundler-cache: true
82-
- name: test
72+
- name: Check documentation syntax
8373
run: bundle exec rake documentation_syntax_check
8474

8575
oldest_supported_rubocop:
@@ -95,8 +85,7 @@ jobs:
9585
cat << EOF > Gemfile.local
9686
gem 'rubocop', '1.52.0' # Specify the oldest supported RuboCop version
9787
EOF
98-
- name: set up Ruby
99-
uses: ruby/setup-ruby@v1
88+
- uses: ruby/setup-ruby@v1
10089
with:
10190
ruby-version: 2.7
10291
bundler-cache: true

0 commit comments

Comments
 (0)