Skip to content

Commit

Permalink
Move internal_investigation to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Earlopain authored and bbatsov committed May 29, 2024
1 parent e77d310 commit fbdffc3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 66 deletions.
58 changes: 0 additions & 58 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ ascii_spec_steps: &ascii_spec_steps
- run: bundle install
- run: bundle exec rake ascii_spec

rubocop_steps: &rubocop_steps
- checkout
- run: bundle install
- run: bundle exec rake internal_investigation
- run:
name: Check requiring libraries successfully
# See https://github.com/rubocop/rubocop/pull/4523#issuecomment-309136113
command: |
ruby -I lib -r bundler/setup -r rubocop -e 'exit 0'
jobs:
# Ruby 2.7
ruby-2.7-spec:
Expand All @@ -53,13 +43,6 @@ jobs:
<<: *common_env
steps:
*ascii_spec_steps
ruby-2.7-rubocop:
docker:
- image: cimg/ruby:2.7
environment:
<<: *common_env
steps:
*rubocop_steps

# Ruby 3.0
ruby-3.0-spec:
Expand All @@ -76,13 +59,6 @@ jobs:
<<: *common_env
steps:
*ascii_spec_steps
ruby-3.0-rubocop:
docker:
- image: cimg/ruby:3.0
environment:
<<: *common_env
steps:
*rubocop_steps

# Ruby 3.1
ruby-3.1-spec:
Expand All @@ -99,13 +75,6 @@ jobs:
<<: *common_env
steps:
*ascii_spec_steps
ruby-3.1-rubocop:
docker:
- image: cimg/ruby:3.1
environment:
<<: *common_env
steps:
*rubocop_steps

# Ruby 3.2
ruby-3.2-spec:
Expand All @@ -122,13 +91,6 @@ jobs:
<<: *common_env
steps:
*ascii_spec_steps
ruby-3.2-rubocop:
docker:
- image: cimg/ruby:3.2
environment:
<<: *common_env
steps:
*rubocop_steps

# Ruby 3.3
ruby-3.3-spec:
Expand All @@ -145,13 +107,6 @@ jobs:
<<: *common_env
steps:
*ascii_spec_steps
ruby-3.3-rubocop:
docker:
- image: cimg/ruby:3.3
environment:
<<: *common_env
steps:
*rubocop_steps

# ruby-head (nightly snapshot build)
ruby-head-spec:
Expand All @@ -168,13 +123,6 @@ jobs:
<<: *common_env
steps:
*ascii_spec_steps
ruby-head-rubocop:
docker:
- image: rubocophq/circleci-ruby-snapshot:latest
environment:
<<: *common_env
steps:
*rubocop_steps

# Job for downloading the Code Climate test reporter
cc-setup:
Expand Down Expand Up @@ -222,32 +170,26 @@ workflows:
requires:
- cc-setup
- ruby-2.7-ascii_spec
- ruby-2.7-rubocop
- ruby-3.0-spec:
requires:
- cc-setup
- ruby-3.0-ascii_spec
- ruby-3.0-rubocop
- ruby-3.1-spec:
requires:
- cc-setup
- ruby-3.1-ascii_spec
- ruby-3.1-rubocop
- ruby-3.2-spec:
requires:
- cc-setup
- ruby-3.2-ascii_spec
- ruby-3.2-rubocop
- ruby-3.3-spec:
requires:
- cc-setup
- ruby-3.3-ascii_spec
- ruby-3.3-rubocop
- ruby-head-spec:
requires:
- cc-setup
- ruby-head-ascii_spec
- ruby-head-rubocop

- cc-upload-coverage:
requires:
Expand Down
43 changes: 35 additions & 8 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ jobs:
ruby: head

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
Expand All @@ -53,8 +47,43 @@ jobs:
run: bundle exec rake spec
- name: ascii_spec
run: bundle exec rake ascii_spec

internal_investigation:
name: Internal Investigation - ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}-latest

strategy:
fail-fast: false
matrix:
os: [ubuntu, windows]
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', 'head']
include:
- os: ubuntu
ruby: jruby-9.4
- os: windows
ruby: mingw
exclude:
- os: windows
ruby: head

steps:
- name: Windows Specific
if: matrix.os == 'windows'
run: |
# Work around `Layout/EndOfLine: Carriage return character detected`
git config --system core.autocrlf false
- name: checkout
uses: actions/checkout@v4
- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: internal_investigation
run: bundle exec rake internal_investigation
- name: Check requiring libraries successfully
# See https://github.com/rubocop/rubocop/pull/4523#issuecomment-309136113
run: ruby -I lib -r bundler/setup -r rubocop -e 'exit 0'

documentation_check:
name: Documentation Check
Expand Down Expand Up @@ -85,8 +114,6 @@ jobs:
run: bundle exec rake spec
- name: ascii_spec
run: bundle exec rake ascii_spec
- name: internal_investigation
run: bundle exec rake internal_investigation

prism:
runs-on: ubuntu-latest
Expand Down

0 comments on commit fbdffc3

Please sign in to comment.