Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up CI a bit #353

Merged
merged 7 commits into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 16 additions & 45 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 5
env:
# See https://github.com/tmm1/test-queue#environment-variables
TEST_QUEUE_WORKERS: 2
RUBOCOP_VERSION: none
JRUBY_OPTS: --dev # http://blog.headius.com/2019/09/jruby-startup-time-exploration.html
TRUFFLERUBYOPT: --engine.Mode=latency # optimize for short test suites
Expand All @@ -42,20 +40,11 @@ jobs:
- { ruby: truffleruby-head, os: ubuntu }

steps:
- name: windows misc
if: matrix.os == 'windows'
run: |
# set TMPDIR, git core.autocrlf
echo "TMPDIR=$env:RUNNER_TEMP" >> $GITHUB_ENV
git config --system core.autocrlf false
- 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 }}
- name: install dependencies
run: bundle install --jobs 3 --retry 3
bundler-cache: true
- name: code coverage
if: matrix.coverage
uses: paambaati/[email protected]
Expand All @@ -72,15 +61,15 @@ jobs:
if: matrix.os != 'windows'
run: (! bundle exec rubocop -h 2> /dev/null) && echo 'RuboCop successfully *not* loaded for local tests'
- name: spec
if: "matrix.coverage != true && matrix.internal_investigation != true"
if: "matrix.coverage != true"
run: bundle exec rake spec

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 @@ -89,31 +78,26 @@ jobs:
env:
PARSER_ENGINE: parser_prism
run: bundle exec rake prism_spec

rubocop_specs:
name: >-
Main Gem Specs | RuboCop: ${{ matrix.rubocop }} | ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}-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]
rubocop: [master]
internal_investigation: [null]
include:
# Instead of testing all possibilities, we test the extreme points of
# a diagonal with the shiniest and latest
- { rubocop: master, ruby: "3.4", os: ubuntu }
# as well as very old specs & ancient ruby version
- { rubocop: "v1.61.0", ruby: "2.7", os: ubuntu }
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 }}
- name: setup env
Expand All @@ -128,28 +112,15 @@ jobs:
run: bundle exec rake generate
- name: spec
run: cd ../rubocop && bundle exec rake spec

internal_investigation:
name: >-
Coding Style | ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}-latest
env:
# See https://github.com/tmm1/test-queue#environment-variables
TEST_QUEUE_WORKERS: 2
RUBOCOP_VERSION: master
strategy:
fail-fast: false
matrix:
os: [ubuntu]
ruby: ["3.0"]
rubocop: [master]
name: Coding Style
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: ${{ matrix.ruby }}
- name: install dependencies
run: bundle install --jobs 3 --retry 3
ruby-version: ruby # Latest stable CRuby version
bundler-cache: true
- name: internal investigation
run: bundle exec rake generate internal_investigation
17 changes: 4 additions & 13 deletions .github/workflows/spell_checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,13 @@ jobs:
codespell:
name: Check spelling of all files with codespell
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: codespell-project/actions-codespell@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install codespell
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Check spelling with codespell
run: codespell --ignore-words=codespell.txt || exit 1
check_filenames: true
check_hidden: true
ignore_words_file: codespell.txt
misspell:
name: Check spelling of all files in commit with misspell
runs-on: ubuntu-latest
Expand Down
Loading