Skip to content

Commit

Permalink
Merge pull request #1402 from Earlopain/ci-sync
Browse files Browse the repository at this point in the history
CI sync with RuboCop
  • Loading branch information
koic authored Dec 28, 2024
2 parents 8f625ad + c2a49b6 commit 09d01f8
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 30 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,41 @@
name: Linting
on:
- pull_request
push:
branches:
- master
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
yamllint:
name: Yamllint
lint-ruby:
name: Ruby
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby # Latest stable CRuby version
bundler-cache: true
- name: internal_investigation
run: bundle exec rake internal_investigation

lint-yaml:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: write # for karancode/yamllint-github-action to post comments on PRs
name: Yaml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Yamllint
uses: karancode/yamllint-github-action@master
uses: karancode/yamllint-github-action@v3.0.0
with:
yamllint_strict: true
yamllint_format: parsable
yamllint_comment: true
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions .github/workflows/spell_checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Spell Checking

on: [pull_request]

permissions: # added using https://github.com/step-security/secure-workflows
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand All @@ -14,6 +17,8 @@ jobs:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
with:
check_filenames: true
check_hidden: true
ignore_words_file: codespell.txt
misspell:
name: Check spelling of all files in commit with misspell
Expand Down
41 changes: 15 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,50 @@ on:
pull_request:
workflow_dispatch:

permissions: # added using https://github.com/step-security/secure-workflows
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
main:
name: Ruby ${{ matrix.ruby }}
name: Spec - ${{ matrix.ruby }}
runs-on: ubuntu-latest
env:
# See https://github.com/tmm1/test-queue#environment-variables
TEST_QUEUE_WORKERS: 2
strategy:
fail-fast: false
matrix:
os: [ubuntu]
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', 'head']

steps:
- name: checkout
uses: actions/checkout@v4
- name: set up Ruby
uses: ruby/setup-ruby@v1
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: spec
run: bundle exec rake spec
- name: internal_investigation
run: bundle exec rake internal_investigation

jruby:
name: JRuby 9.4
name: Spec - JRuby
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: set up Ruby
uses: ruby/setup-ruby@v1
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: jruby-9.4
ruby-version: jruby # Latest stable JRuby version
bundler-cache: true
- name: spec
run: bundle exec rake spec
- name: internal_investigation
run: bundle exec rake internal_investigation

prism:
runs-on: ubuntu-latest
name: Prism
steps:
- uses: actions/checkout@v4
- name: set up Ruby
uses: ruby/setup-ruby@v1
- uses: ruby/setup-ruby@v1
with:
# Specify the minimum Ruby version 2.7 required for Prism to run.
ruby-version: 2.7
Expand All @@ -74,12 +65,11 @@ jobs:
name: Check documentation syntax
steps:
- uses: actions/checkout@v4
- name: set up Ruby
uses: ruby/setup-ruby@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
ruby-version: ruby # Latest stable CRuby version
bundler-cache: true
- name: test
- name: Check documentation syntax
run: bundle exec rake documentation_syntax_check

oldest_supported_rubocop:
Expand All @@ -95,8 +85,7 @@ jobs:
cat << EOF > Gemfile.local
gem 'rubocop', '1.52.0' # Specify the oldest supported RuboCop version
EOF
- name: set up Ruby
uses: ruby/setup-ruby@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
Expand Down

0 comments on commit 09d01f8

Please sign in to comment.